diff options
author | albert-github <albert.tests@gmail.com> | 2020-07-27 10:38:09 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2020-07-27 10:38:09 (GMT) |
commit | 603b2ada84164c9e740552cec052c01803bee383 (patch) | |
tree | cc647b56c6f0598ebef4d3d57d3cfa170ff8dc66 /src/fortranscanner.l | |
parent | 483b47ddd8039ba77aacc11d35825489f74b3b47 (diff) | |
download | Doxygen-603b2ada84164c9e740552cec052c01803bee383.zip Doxygen-603b2ada84164c9e740552cec052c01803bee383.tar.gz Doxygen-603b2ada84164c9e740552cec052c01803bee383.tar.bz2 |
issue #7923 source line numbers in warnings output by parser are off by 1
Explicit counting of the removed newlines at the beginning of a documenation block (markdown.cpp) so this number can be added to get a better line number in case of warnings.
Diffstat (limited to 'src/fortranscanner.l')
-rw-r--r-- | src/fortranscanner.l | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 4d80d5f..81dcb16 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -2518,7 +2518,9 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief int position=0; bool needsEntry = FALSE; Markdown markdown(yyextra->fileName,lineNr); - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc) : doc; + int startNewlines = 0; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; + lineNr += startNewlines; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, yyextra->docBlockInBody ? yyextra->subrCurrent.back().get() : yyextra->current.get(), |