Skip to content

Commit 5748ddb

Browse files
committed
issue #10904 Topics page lists modules but no descriptions
For #10414 some extra line positioning statements were added but this was not properly checked in `endBrief`. To keep the line counting correct (also for #10414) some extra line counting considerations had to be made.
1 parent c2002ae commit 5748ddb

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

src/commentscan.l

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@ STopt [^\n@\\]*
14491449
yyextra->current->type += yytext;
14501450
yyextra->current->type = yyextra->current->type.stripWhiteSpace();
14511451
}
1452-
<GroupDocArg2>{DOCNL} {
1452+
<GroupDocArg2>{DOCNL}+ {
14531453
if ( yyextra->current->groupDocType==Entry::GROUPDOC_NORMAL &&
14541454
yyextra->current->type.isEmpty()
14551455
) // defgroup requires second argument
@@ -1460,10 +1460,18 @@ STopt [^\n@\\]*
14601460
);
14611461
}
14621462
unput_string(yytext,yyleng);
1463+
int extraLineNr = 0;
1464+
if (yyextra->inContext == OutputBrief)
1465+
{
1466+
for (int i = 0; i < yyleng; i++)
1467+
{
1468+
if (yytext[i]=='\n') extraLineNr++;
1469+
}
1470+
}
14631471
//if (*yytext=='\n') yyextra->lineNr++;
14641472
//addOutput(yyscanner,'\n');
14651473
addOutput(yyscanner," \\ifile \""+ yyextra->fileName);
1466-
addOutput(yyscanner,"\" \\ilinebr \\iline " + QCString().setNum(yyextra->lineNr) + " \\ilinebr ");
1474+
addOutput(yyscanner,"\" \\ilinebr \\iline " + QCString().setNum(yyextra->lineNr + extraLineNr) + " \\ilinebr ");
14671475
BEGIN( Comment );
14681476
}
14691477
<GroupDocArg2>. { // title (stored in type)
@@ -4500,7 +4508,10 @@ static void addIlineBreak(yyscan_t yyscanner,int lineNr)
45004508
static void endBrief(yyscan_t yyscanner)
45014509
{
45024510
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
4503-
if (!yyextra->current->brief.stripWhiteSpace().isEmpty())
4511+
static const reg::Ex nonBrief(R"( *[\\@]ifile *\"[^\"]*\" *[\\@]ilinebr *[\\@]iline *(\d+) *[\\@]ilinebr( *\n*))");
4512+
std::string str = yyextra->current->brief.str();
4513+
reg::Match match;
4514+
if (!yyextra->current->brief.stripWhiteSpace().isEmpty() && !reg::match(str,match,nonBrief))
45044515
{ // only go to the detailed description if we have
45054516
// found some brief description and not just whitespace
45064517
yyextra->briefEndsAtDot=FALSE;

0 commit comments

Comments
 (0)