summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index 3af682c..235cd7c 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -1121,6 +1121,8 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
// the {B}* in the front was added for bug620924
QCString fullMatch = QCString(yytext);
int idx = fullMatch.find('{');
+ /* handle `\f{` and `@f{` as special cases */
+ if ((idx > 1) && (yytext[idx-1] == 'f') && (yytext[idx-2] == '\\' || yytext[idx-2] =='@')) REJECT;
int idxEnd = fullMatch.find("}",idx+1);
QCString cmdName;
QCStringList optList;
@@ -1617,20 +1619,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 );
}
@@ -3005,7 +2999,9 @@ static bool handleToc(const QCString &, const QCStringList &optList)
}
if (current->localToc.nothingEnabled())
{
- current->localToc.enableHtml(5); // for backward compatibility
+ // for backward compatibility
+ current->localToc.enableHtml(5);
+ current->localToc.enableXml(5);
}
}
return FALSE;
@@ -3102,12 +3098,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
{