From 2934e3cb1d32cda1950d809a210c787475fd41ba Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 12 Jun 2019 19:08:51 +0200 Subject: issue #7050 Physical newlines (^^) not working in group names and without spaces in 1.8.15 Handling of `\_linebr` with defgroup and also with the `\page` command. Adding a missing linecount. --- src/commentscan.l | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index e75d023..a6098c0 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -1576,7 +1576,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" yyLineNr++; addOutput('\n'); } -[^\n\*]+ { // title (stored in type) +[^\n\\]+ { // title (stored in type) current->type += yytext; current->type = current->type.stripWhiteSpace(); } @@ -1594,11 +1594,16 @@ RCSTAG "$"{ID}":"[^\n$]+"$" addOutput('\n'); BEGIN( Comment ); } +. { // title (stored in type) + current->type += yytext; + current->type = current->type.stripWhiteSpace(); + } /* --------- handle arguments of page/mainpage command ------------------- */ {FILE} { // first argument; page name current->name = stripQuotes(yytext); + current->args = ""; BEGIN( PageDocArg2 ); } {LC} { yyLineNr++; @@ -1615,17 +1620,21 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } . { // ignore other stuff } -.*"\n" { // second argument; page title - yyLineNr++; +{DOCNL} { // second argument; page title + if (*yytext=='\n') yyLineNr++; + addOutput('\n'); + BEGIN( Comment ); + } +{CMD}[<>] { // bug 748927 QCString tmp = yytext; tmp = substitute(substitute(tmp,"@<","<"),"@>",">"); tmp = substitute(substitute(tmp,"\\<","<"),"\\>",">"); - current->args = tmp; - addOutput('\n'); - BEGIN( Comment ); + current->args += tmp; } - +. { + current->args += yytext; + } /* --------- handle arguments of the param command ------------ */ {ID}/{B}*"," { addOutput(yytext); @@ -1965,6 +1974,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" addOutput(*yytext); } {B}*{DOCNL} { + if (yytext[strlen(yytext)-1]=='\n') yyLineNr++; g_spaceBeforeIf.resize(0); BEGIN(Comment); } @@ -2462,6 +2472,7 @@ static bool handleMainpage(const QCString &, const QCStringList &) { current->name = "mainpage"; } + current->name = ""; BEGIN( PageDocArg2 ); return stop; } -- cgit v0.12