Fix off-by-one error in inline code block parsing
This commit is contained in:
parent
d96e204c3a
commit
dc1c7a3553
2 changed files with 3 additions and 3 deletions
|
@ -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 "`";
|
||||
|
|
4
test.sh
4
test.sh
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue