diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2011-12-10 20:30:14 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2011-12-10 20:30:14 (GMT) |
commit | b625258a2f46f61e85bf473dfa64b719755c3b71 (patch) | |
tree | bb2f8266e3a639e6a4b15f02416a3aae5173c275 /src/commentscan.l | |
parent | e48f695c385ccc356e124ac3a851a6228f4f5b84 (diff) | |
download | Doxygen-b625258a2f46f61e85bf473dfa64b719755c3b71.zip Doxygen-b625258a2f46f61e85bf473dfa64b719755c3b71.tar.gz Doxygen-b625258a2f46f61e85bf473dfa64b719755c3b71.tar.bz2 |
Release-1.7.6.1
Diffstat (limited to 'src/commentscan.l')
-rw-r--r-- | src/commentscan.l | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/commentscan.l b/src/commentscan.l index 8ea61ce..cb295d1 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -402,6 +402,8 @@ static int g_condCount; static int g_sectionLevel; static int g_commentCount; +static bool g_spaceBeforeCmd; +static bool g_spaceBeforeIf; //----------------------------------------------------------------------------- @@ -955,6 +957,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" // the {B}* in the front was added for bug620924 QCString cmdName = QCString(yytext).stripWhiteSpace().data()+1; DocCmdMapper::Cmd *cmdPtr = DocCmdMapper::map(cmdName); + g_spaceBeforeCmd = yytext[0]==' ' || yytext[0]=='\t'; if (cmdPtr) // special action is required { if (cmdPtr->endsBrief) @@ -1675,9 +1678,15 @@ RCSTAG "$"{ID}":"[^\n$]+"$" addOutput(*yytext); } <GuardParamEnd>{B}*{DOCNL} { + g_spaceBeforeIf=FALSE; BEGIN(Comment); } <GuardParamEnd>{B}* { + if (g_spaceBeforeIf) // needed for 665313 in combation with bug620924 + { + addOutput(" "); + } + g_spaceBeforeIf=FALSE; BEGIN(Comment); } <GuardParamEnd>. { @@ -2323,6 +2332,7 @@ static bool handleIf(const QCString &) { enabledSectionFound=FALSE; guardType = Guard_If; + g_spaceBeforeIf = g_spaceBeforeCmd; BEGIN(GuardParam); return FALSE; } @@ -2331,6 +2341,7 @@ static bool handleIfNot(const QCString &) { enabledSectionFound=FALSE; guardType = Guard_IfNot; + g_spaceBeforeIf = g_spaceBeforeCmd; BEGIN(GuardParam); return FALSE; } @@ -2557,6 +2568,8 @@ bool parseCommentBlock(/* in */ ParserInterface *parser, briefEndsAtDot = isAutoBriefOn; g_condCount = 0; g_sectionLevel = 0; + g_spaceBeforeCmd = FALSE; + g_spaceBeforeIf = FALSE; if (!current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments { |