summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2018-12-24 21:18:53 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2018-12-24 21:18:53 (GMT)
commit48e838a1d15c5feb2247f9c93bebc971b871800c (patch)
tree227eb76925d8494618d7b58ff6aab28c15a98496 /src/commentscan.l
parentc94a53eefb4159d238cb5714b6732e145aaeb582 (diff)
downloadDoxygen-48e838a1d15c5feb2247f9c93bebc971b871800c.zip
Doxygen-48e838a1d15c5feb2247f9c93bebc971b871800c.tar.gz
Doxygen-48e838a1d15c5feb2247f9c93bebc971b871800c.tar.bz2
Fix regression due to move of markdown processing
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index c5349cf..90e7ac3 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -1617,20 +1617,12 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* --------- handle arguments of the param command ------------ */
<ParamArg1>{ID}/{B}*"," {
- if (yytext[0]=='_' && Config_getBool(MARKDOWN_SUPPORT))
- {
- addOutput('\\');
- }
addOutput(yytext);
}
<ParamArg1>"," {
addOutput(" , ");
}
<ParamArg1>{ID} {
- if (yytext[0]=='_' && Config_getBool(MARKDOWN_SUPPORT))
- {
- addOutput('\\');
- }
addOutput(yytext);
BEGIN( Comment );
}
@@ -3104,12 +3096,19 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
if (comment.isEmpty()) return FALSE; // avoid empty strings
if (Doxygen::markdownSupport)
{
- inputString = processMarkdown(fileName,lineNr,NULL,comment);
- QString qq(inputString);
- while (qq.startsWith(" ")) qq = qq.mid(1);
- while (qq.startsWith("\n")) qq = qq.mid(1);
- if (qq.startsWith("<br>")) qq = qq.mid(4);
- inputString = QCString(qq.data());
+ inputString = processMarkdown(fileName,lineNr,NULL,comment);
+ const char *p = inputString.data();
+ if (p)
+ {
+ while (*p==' ') p++; // skip over spaces
+ while (*p=='\n') p++; // skip over newlines
+ if (qstrncmp(p,"<br>",4)==0) p+=4; // skip over <br>
+ }
+ if (p>inputString.data())
+ {
+ // strip part of the input
+ inputString = inputString.mid(p-inputString.data());
+ }
}
else
{