Skip to content

Commit aadb457

Browse files
committed
issue doxygen#11309 Markdown blockquotes with lists do not render as expected
1 parent 27f1eb8 commit aadb457

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/doctokenizer.l

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,15 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
614614
QCString value = Portable::getenv(name);
615615
for (int i=static_cast<int>(value.length())-1;i>=0;i--) unput(value.at(i));
616616
}
617+
<St_Para>"<blockquote>&zwj;" {
618+
// for a markdown inserted block quote,
619+
// tell flex that after putting the last indent
620+
// back we are at the beginning of the line, see issue #11309
621+
YY_CURRENT_BUFFER->yy_at_bol=1;
622+
lineCount(yytext,yyleng);
623+
handleHtmlTag(yyscanner,yytext);
624+
return Token::make_TK_HTMLTAG();
625+
}
617626
<St_Para>{HTMLTAG} { /* html tag */
618627
lineCount(yytext,yyleng);
619628
handleHtmlTag(yyscanner,yytext);

src/markdown.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2796,7 +2796,7 @@ size_t Markdown::Private::writeBlockQuote(std::string_view data)
27962796
j--;
27972797
}
27982798
AUTO_TRACE_ADD("indent={} i={} j={} end={} level={} line={}",indent,i,j,end,level,Trace::trunc(&data[i]));
2799-
if (level==0 && j<end-1)
2799+
if (level==0 && j<end-1 && !isListMarker(data.substr(j)) && !isHRuler(data.substr(j)))
28002800
{
28012801
level = curLevel; // lazy
28022802
}
@@ -2835,7 +2835,7 @@ size_t Markdown::Private::writeBlockQuote(std::string_view data)
28352835
}
28362836
for (int l=level;l<decrLevel;l++)
28372837
{
2838-
out += "</blockquote>";
2838+
out += "</blockquote>\\ilinebr ";
28392839
}
28402840
}
28412841
if (level==0)

0 commit comments

Comments
 (0)