Commit de502ca7 authored by albert-github's avatar albert-github

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).
parent 1134237a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment