Skip to content

Commit 498de41

Browse files
committed
issue @10606 include command via ALIASES does not work anymore (2)
In #10916 the major problem was already fixed but it introduced a small regression took place in CGAL (in a start simplified example): ``` /// \file /// /// Part0 \cgalCite{X0}. /// void fie0(); ``` and the setting: ``` ALIASES = "cgalCite{1}=\1" ``` to the warning: ``` vcm_estimate_edges.h:5: warning: End of list marker found without any preceding list items ``` The problem is that the rule `<ReadLine,CopyLine>{RLopt}` already could eat the initial space (as `RLopt [^\\@<\n\*\/`]*`).
1 parent 4d93134 commit 498de41

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/commentcnv.l

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,11 +1187,12 @@ SLASHopt [/]*
11871187
<CComment,ReadLine,IncludeFile,Verbatim,VerbatimCode>[\\@][a-z_A-Z][a-z_A-Z0-9-]* { // expand alias without arguments
11881188
replaceAliases(yyscanner,yytext,YY_START==ReadLine && yyextra->readLineCtx==SComment);
11891189
}
1190-
<CComment,ReadLine,IncludeFile,Verbatim,VerbatimCode>{B}"\\ilinebr"{B}[\\@]"ialias{" { // expand alias with arguments
1190+
<CComment,ReadLine,IncludeFile,Verbatim,VerbatimCode>{B}?"\\ilinebr"{B}[\\@]"ialias{" { // expand alias with arguments
11911191
yyextra->lastBlockContext=YY_START;
11921192
yyextra->blockCount=1;
1193-
yyextra->aliasString=yytext+10;
1194-
yyextra->aliasCmd=yytext+10;
1193+
int extraSpace = (yytext[0]==' '? 1:0);
1194+
yyextra->aliasString=yytext+9+extraSpace;
1195+
yyextra->aliasCmd=yytext+9+extraSpace;
11951196
yyextra->lastEscaped=0;
11961197
BEGIN( ReadAliasArgs );
11971198
}

0 commit comments

Comments
 (0)