From dc1c7a3553d5e4f9664de80ed7a43d914a29330a Mon Sep 17 00:00:00 2001 From: Konstantin Nazarov Date: Sun, 25 Jul 2021 21:22:29 +0000 Subject: [PATCH] Fix off-by-one error in inline code block parsing --- markdown.awk | 2 +- test.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/markdown.awk b/markdown.awk index 20adfcb..61fcd23 100644 --- a/markdown.awk +++ b/markdown.awk @@ -225,7 +225,7 @@ function parse_line(str, result, end, i) { end = find(str, "`", i+1); if (end != 0) { result = result "" escape_text(substr(str, i+1, end - i - 1)) ""; - i = end+1; + i = end; } else { result = result "`"; diff --git a/test.sh b/test.sh index e635597..2ce956e 100755 --- a/test.sh +++ b/test.sh @@ -143,9 +143,9 @@ second line of code EOF check <<-"EOF" -This is `inline code` +This is `inline code` block --- -

This is inline code

+

This is inline code block

EOF check <<-"EOF"