From 75c5c2837a9652cfa94e349c334d5a8f67b91d60 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 26 Dec 2020 18:36:03 +0100 Subject: Miscounting lines in case a fenced code block When having the following code: ``` # The page ~~~ ABC ~~~ ~~~ DEF ~~~ ~~~ GHI ~~~ ~~~ JKL~~~ \line17 ``` we get the warnings: ``` .../aa.md:16: warning: Found unknown command '\line17' ``` instead of ``` .../aa.md:17: warning: Found unknown command '\line17' ``` The last character of the fenced code block is not handled in the code block. This problem has been solved (and also checked against the previous examples of #8045 and #8123). --- src/markdown.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index 4a40a35..340ac99 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1649,7 +1649,7 @@ static bool isFencedCodeBlock(const char *data,int size,int refIndent, { if (data[i]==tildaChar) { - end=i-1; + end=i; int endTildes=0; while (i