summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-12-26 17:36:03 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-12-26 17:36:03 (GMT)
commit75c5c2837a9652cfa94e349c334d5a8f67b91d60 (patch)
tree4c0cc7c2ca54b31d15e943aa992c0e04f156bd90
parenta945d52a62b73b23674f6dc0948e22011e278cf9 (diff)
downloadDoxygen-75c5c2837a9652cfa94e349c334d5a8f67b91d60.zip
Doxygen-75c5c2837a9652cfa94e349c334d5a8f67b91d60.tar.gz
Doxygen-75c5c2837a9652cfa94e349c334d5a8f67b91d60.tar.bz2
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).
-rw-r--r--src/markdown.cpp3
1 files changed, 1 insertions, 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<size && data[i]==tildaChar) endTildes++,i++;
while (i<size && data[i]==' ') i++;
@@ -2291,7 +2291,6 @@ void Markdown::writeFencedCodeBlock(const char *data,const char *lng,
m_out.addStr("{"+lang+"}");
}
addStrEscapeUtf8Nbsp(data+blockStart,blockEnd-blockStart);
- m_out.addStr(" ");
m_out.addStr("@endcode");
}