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/pyscanner.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/pyscanner.l')
-rw-r--r-- | src/pyscanner.l | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l index 07b39d6..6a80e34 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -1631,7 +1631,9 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief bool needsEntry; int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine; Markdown markdown(yyextra->yyFileName,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->previous) ? yyextra->previous.get() : yyextra->current.get(), |