Skip to content

Commit 07f0fb7

Browse files
committed
issue #10902 Improve Markdown Support - blockquotes with special markers parse wrongly
In case of a line after the "indentation" only contains white space replace it wit `<br><br>` analogous to what happens with blockquotes and on GitHub.
1 parent c2002ae commit 07f0fb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/markdown.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2782,7 +2782,12 @@ size_t Markdown::Private::writeBlockQuote(std::string_view data)
27822782
}
27832783
if (level==0) break; // end of quote block
27842784
// copy line without quotation marks
2785-
if (curLevel != 0 || !isGitHubAlert) out+=data.substr(indent,end-indent);
2785+
if (curLevel != 0 || !isGitHubAlert)
2786+
{
2787+
QCString txt = data.substr(indent,end-indent);
2788+
if (txt.stripWhiteSpace().isEmpty() && !startCmd.isEmpty()) out += "<br><br>\n";
2789+
else out += txt;
2790+
}
27862791
else out+= "\n";
27872792
curLevel=level;
27882793
// proceed with next line

0 commit comments

Comments
 (0)