Skip to content

Commit 85fba65

Browse files
committed
Incorrect counting of markdown verbatim block
When we have a file aa.md like: ``` Initial text 1 verbatim text? Some text \aa5 ``` and a file bb.md like ``` Initial text 1 verbatim text? Some text \aa4 `` we get the warnings like (with current master, with 1.8.20 it is even further off): ``` aa.md:6: warning: Found unknown command '\aa5' bb.md:5: warning: Found unknown command '\aa4' ``` instead of ``` aa.md:5: warning: Found unknown command '\aa5' bb.md:4: warning: Found unknown command '\aa4' ``` This has been corrected
1 parent 7859a9a commit 85fba65

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/markdown.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,7 @@ int Markdown::writeCodeBlock(const char *data,int size,int refIndent)
21302130
TRACE(data);
21312131
int i=0,end;
21322132
//printf("writeCodeBlock: data={%s}\n",QCString(data).left(size).data());
2133+
// no need for \ilinebr here as the prvious like was empty and was skipped
21332134
m_out.addStr("@verbatim\n");
21342135
int emptyLines=0;
21352136
while (i<size)
@@ -2164,7 +2165,7 @@ int Markdown::writeCodeBlock(const char *data,int size,int refIndent)
21642165
break;
21652166
}
21662167
}
2167-
m_out.addStr("@endverbatim\n");
2168+
m_out.addStr("@endverbatim\\ilinebr ");
21682169
while (emptyLines>0) // write skipped empty lines
21692170
{
21702171
// add empty line

0 commit comments

Comments
 (0)