Skip to content

Commit

Permalink
issue #8817 If \if, \else or \endif is in a list, the subsequent list…
Browse files Browse the repository at this point in the history
… entry is not formatted as list entry but in "raw format"

Looking at the results of the version 1.9.1 the result is OK, in the 1.9.2 version it is not OK.
Having:
```
/**

\mainpage

-# '1'
-# '2'
\if ASDF
-# '3' IF-CASE ASDF \line8
\else
-# '3' ELSE-CASE ASDF \line10
\endif
-# '4'

*/
```
we see with `doxygen -d commentscan` in the 1.9.2 version:
```
CommentScanner: D:/speeltuin/issue_8817/DoxyIfElse/Input.dox:3
output=[
brief=[line=-1
]
docs=[line=5
-# '1'
-# '2'
\iline 8 -# '3' IF-CASE ASDF \line8
\iline 12 -# '4']
inbody=[line=-1
]
]
```
i.e. the `-#` is not at the beginning of the line anymore  due to the `\iline` (which was necessary to have correct line numbers for warnings).
We need an extra newline, not a normal newline, as this would disturb the line counting process,  but a doxygen internal newline i.e. `\ilinebr `
  • Loading branch information
albert-github committed Oct 6, 2021
1 parent 2346371 commit 8e57e86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commentscan.l
Original file line number Diff line number Diff line change
Expand Up @@ -3309,7 +3309,7 @@ static inline void addOutput(yyscan_t yyscanner,char c)
static void addIline(yyscan_t yyscanner,int lineNr)
{
char cmd[20];
sprintf(cmd,"\\iline %d ",lineNr);
sprintf(cmd,"\\iline %d \\ilinebr ",lineNr);
addOutput(yyscanner, cmd);
}

Expand Down

0 comments on commit 8e57e86

Please sign in to comment.