Skip to content

Commit e12fd69

Browse files
committed
Line miscount in case of Html type Comment
When having an example like: ``` /*! \file <table> <tr><th> Command</th> <th> Function</th></tr> <!-- this is a multiline comment end of comment --> <tr><td> ? \xx6 </td><td> Dummy</td></tr> </table> */ ``` we get the warning: ``` .../aa.c:5: warning: Found unknown command '\xx6' ``` instead of ``` .../aa.c:6: warning: Found unknown command '\xx6' ```
1 parent e16e8f3 commit e12fd69

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/commentscan.l

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
887887

888888
<HtmlComment>"--"[!]?">"{B}* { BEGIN( Comment ); }
889889
<HtmlComment>{DOCNL} {
890-
if (*yytext=='\n') yyextra->lineNr++;
890+
if (*yytext=='\n')
891+
{
892+
addOutput(yyscanner,*yytext);
893+
yyextra->lineNr++;
894+
}
891895
}
892896
<HtmlComment>[^\\\n\-]+ { // ignore unimportant characters
893897
}

0 commit comments

Comments
 (0)