Skip to content

Commit f16ea5e

Browse files
committed
Spurious colon in the output
When having `@subpage:` in the comment this leads to a spurious `:` in the standard output as the character was handled by the default rule.
1 parent ec1e1df commit f16ea5e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/commentscan.l

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,6 +1480,10 @@ STopt [^\n@\\]*
14801480
addOutput(yyscanner,'\n');
14811481
BEGIN( Comment );
14821482
}
1483+
<SubpageLabel>. {
1484+
unput(yytext[0]);
1485+
BEGIN( Comment );
1486+
}
14831487
<SubpageTitle>{DOCNL} { // no title, end command
14841488
addOutput(yyscanner,yytext);
14851489
BEGIN( Comment );
@@ -2015,9 +2019,9 @@ STopt [^\n@\\]*
20152019
}
20162020

20172021
/*
2018-
<*>. { fprintf(stderr,"Lex scanner %s %sdefault rule for state %s: #%s#\n", __FILE__,yyextra->fileName ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START),yytext);}
2019-
<*>\n { fprintf(stderr,"Lex scanner %s %sdefault rule newline for state %s.\n", __FILE__, yyextra->fileName ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START));}
2020-
*/
2022+
<*>. { fprintf(stderr,"Lex scanner %s %sdefault rule for state %s: #%s#\n", __FILE__,!yyextra->fileName.isEmpty() ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START),yytext);}
2023+
<*>\n { fprintf(stderr,"Lex scanner %s %sdefault rule newline for state %s.\n", __FILE__, !yyextra->fileName.isEmpty() ? ("(" + yyextra->fileName +") ").data(): "",stateToString(YY_START));}
2024+
*/
20212025

20222026
%%
20232027

0 commit comments

Comments
 (0)