summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-07-28 07:51:41 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-07-28 07:51:41 (GMT)
commit4fbe0ad60921724faf6ba635df13983b3496f3e9 (patch)
treefaabcb8bd596c15e438319457dd97930c52d6e91 /src/commentscan.l
parent10c1495dc8984ec3b800c290f1c7448e75478da1 (diff)
downloadDoxygen-4fbe0ad60921724faf6ba635df13983b3496f3e9.zip
Doxygen-4fbe0ad60921724faf6ba635df13983b3496f3e9.tar.gz
Doxygen-4fbe0ad60921724faf6ba635df13983b3496f3e9.tar.bz2
More improvement regarding \\ilinebr handling
- White space around \\ilinebr is not preserved in commentscan - Cases where \n was unput in doctokenizer are now handled in the same way for \\ilinebr
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l14
1 files changed, 5 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;