Skip to content

Commit

Permalink
Line miscount in case of Html type Comment
Browse files Browse the repository at this point in the history
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'
```
  • Loading branch information
albert-github committed Nov 28, 2020
1 parent e16e8f3 commit e12fd69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commentscan.l
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$"

<HtmlComment>"--"[!]?">"{B}* { BEGIN( Comment ); }
<HtmlComment>{DOCNL} {
if (*yytext=='\n') yyextra->lineNr++;
if (*yytext=='\n')
{
addOutput(yyscanner,*yytext);
yyextra->lineNr++;
}
}
<HtmlComment>[^\\\n\-]+ { // ignore unimportant characters
}
Expand Down

0 comments on commit e12fd69

Please sign in to comment.