Permalink
Browse files

Bug 678436 - Nested \if messes up list items

Blank spaces after an if statement have to be removed as well. Just enable them as part of the parameter of the conditional expression and remove them later on (to be safe not having them in the parser).
  • Loading branch information...
albert-github committed Apr 6, 2014
1 parent 1134237 commit de502ca71fc1c20ed93209f6a223c488eee38297
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/commentscan.l
@@ -1836,7 +1836,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
unput(*yytext);
BEGIN(GuardParam);
}
<GuardParam>[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot guard
<GuardParam>{B}*[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot guard
handleGuard(yytext);
}
<GuardParam>{DOCNL} { // end of argument
@@ -3135,7 +3135,7 @@ static void groupAddDocs(Entry *e,const char *fileName)
static void handleGuard(const QCString &expr)
{
CondParser prs;
bool sectionEnabled=prs.parse(yyFileName,yyLineNr,expr);
bool sectionEnabled=prs.parse(yyFileName,yyLineNr,expr.stripWhiteSpace());
bool parentEnabled = TRUE;
if (!guards.isEmpty()) parentEnabled = guards.top()->isEnabled();
if (parentEnabled)

0 comments on commit de502ca

Please sign in to comment.