diff options
-rw-r--r-- | src/commentscan.l | 14 | ||||
-rw-r--r-- | src/doctokenizer.l | 6 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/commentscan.l b/src/commentscan.l index 3d0ca69..763a2dd 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -163,7 +163,6 @@ struct DocCmdMap static const std::map< std::string, DocCmdMap > docCmdMap = { // command name handler function command spacing - { "ilinebr", { &handleLineBr, CommandSpacing::Inline }}, { "addindex", { &handleAddIndex, CommandSpacing::Invisible }}, { "addtogroup", { &handleAddToGroup, CommandSpacing::Invisible }}, { "anchor", { &handleAnchor, CommandSpacing::Invisible }}, @@ -646,6 +645,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$" ); yyextra->inInternalDocs = FALSE; } +<Comment>{B}*"\\ilinebr"{B}* { // preserve spacing around \\ilinebr + addOutput(yyscanner,yytext); + } <Comment>{B}*{CMD}[a-z_A-Z]+"{"[a-zA-Z_,:0-9\. ]*"}"{B}* | <Comment>{B}*{CMD}[a-z_A-Z]+{B}* { // potentially interesting command // the {B}* in the front was added for bug620924 @@ -663,8 +665,8 @@ RCSTAG "$"{ID}":"[^\n$]+"$" else // options present { cmdName = fullMatch.left(idx).stripWhiteSpace().data()+1; // to remove {CMD} - QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace(); - optList = QCStringList::split(',',optStr); + QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace(); + optList = QCStringList::split(',',optStr); } auto it = docCmdMap.find(cmdName.data()); if (it!=docCmdMap.end()) // special action is required @@ -2538,12 +2540,6 @@ static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringLi return FALSE; } -static bool handleLineBr(yyscan_t yyscanner,const QCString &, const QCStringList &) -{ - addOutput(yyscanner,"\\ilinebr "); - return FALSE; -} - static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 51d234b..0b14613 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -955,6 +955,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_Title>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_TitleN>"&"{ID}";" { /* symbol */ @@ -994,6 +995,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_TitleN>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_TitleQ>"&"{ID}";" { /* symbol */ @@ -1024,6 +1026,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_TitleQ>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* { // title attribute @@ -1045,6 +1048,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_TitleV,St_TitleA>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } @@ -1077,6 +1081,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_Cite>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_Cite>. { // any other character @@ -1107,6 +1112,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_Ref>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_Ref>. { // any other character |