Fix off-by-one error in inline code block parsing

This commit is contained in:
Konstantin Nazarov 2021-07-25 21:22:29 +00:00
parent d96e204c3a
commit dc1c7a3553
Signed by: knazarov
GPG key ID: 4CFE0A42FA409C22
2 changed files with 3 additions and 3 deletions

View file

@ -225,7 +225,7 @@ function parse_line(str, result, end, i) {
end = find(str, "`", i+1);
if (end != 0) {
result = result "<code>" escape_text(substr(str, i+1, end - i - 1)) "</code>";
i = end+1;
i = end;
}
else {
result = result "`";

View file

@ -143,9 +143,9 @@ second line of code
EOF
check <<-"EOF"
This is `inline code`
This is `inline code` block
---
<p>This is <code>inline code</code></p>
<p>This is <code>inline code</code> block</p>
EOF
check <<-"EOF"