Skip to content

Commit 02edaeb

Browse files
committed
issue #8670: Wrong rendering of Markdown
1 parent 97dffa0 commit 02edaeb

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/commentscan.l

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2413,6 +2413,11 @@ static bool handleCite(yyscan_t yyscanner,const QCString &s, const StringVector
24132413
static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const StringVector &optList)
24142414
{
24152415
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
2416+
if (!yyextra->spaceBeforeCmd.isEmpty())
2417+
{
2418+
addOutput(yyscanner,yyextra->spaceBeforeCmd);
2419+
yyextra->spaceBeforeCmd.resize(0);
2420+
}
24162421
if (optList.empty())
24172422
{
24182423
addOutput(yyscanner,"@"+s+" ");

src/markdown.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,6 +2309,12 @@ void Markdown::writeFencedCodeBlock(const char *data,const char *lng,
23092309
TRACE(data);
23102310
QCString lang = lng;
23112311
if (!lang.isEmpty() && lang.at(0)=='.') lang=lang.mid(1);
2312+
while (*data==' ' || *data=='\t')
2313+
{
2314+
m_out.addChar(*data++);
2315+
blockStart--;
2316+
blockEnd--;
2317+
}
23122318
m_out.addStr("@code");
23132319
if (!lang.isEmpty())
23142320
{

0 commit comments

Comments
 (0)