Skip to content

Commit 7da5ee8

Browse files
committed
Handling return in \cite command
When having something like: ``` /** * First al \cite * mattes2001 */ ``` we get a warning about an empty / missing label and the link is generated depending on the fact whether on another place there is something like: ``` * \cite mattes2001 ``` The split of the `\cite` and the label is in the commentscan not allowed but allowed in the doctokenizer. Fixed by allowing the split also in the commentscan.
1 parent 2a4d39e commit 7da5ee8

File tree

1 file changed

+1
-18
lines changed

1 file changed

+1
-18
lines changed

src/commentscan.l

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2750,24 +2750,7 @@ STopt [^\n@\\]*
27502750
BEGIN(SectionTitle);
27512751
}
27522752
}
2753-
<CiteLabel,CiteLabelSection>{DOCNL} { // missing argument
2754-
warn(yyextra->fileName,yyextra->lineNr,
2755-
"\\cite command has no label"
2756-
);
2757-
//if (*yytext=='\n') yyextra->lineNr++;
2758-
//addOutput(yyscanner,'\n');
2759-
if (YY_START == CiteLabel)
2760-
{
2761-
unput_string(yytext,yyleng);
2762-
BEGIN(Comment);
2763-
}
2764-
else
2765-
{
2766-
yyextra->sectionTitle+=yytext;
2767-
unput_string(yytext,yyleng);
2768-
BEGIN(SectionTitle);
2769-
}
2770-
}
2753+
<CiteLabel,CiteLabelSection>{DOCNL} { if (*yytext=='\n') yyextra->lineNr++;}
27712754
<CiteLabel,CiteLabelSection>. { // invalid character for cite label
27722755
warn(yyextra->fileName,yyextra->lineNr,
27732756
"Invalid or missing cite label"

0 commit comments

Comments
 (0)