From b3fca8f555183bb8a6863558d912e06f9dd2c929 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 28 Jul 2020 10:39:27 +0200 Subject: More minor tweaks --- src/fortranscanner.l | 4 +--- src/pyscanner.l | 4 +--- src/scanner.l | 4 +--- src/vhdljjparser.cpp | 8 ++++---- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 81dcb16..cf48a3e 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -2518,9 +2518,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief int position=0; bool needsEntry = FALSE; Markdown markdown(yyextra->fileName,lineNr); - int startNewlines = 0; - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; - lineNr += startNewlines; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,lineNr) : doc; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, yyextra->docBlockInBody ? yyextra->subrCurrent.back().get() : yyextra->current.get(), diff --git a/src/pyscanner.l b/src/pyscanner.l index 6a80e34..822ea77 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -1631,9 +1631,7 @@ 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); - int startNewlines = 0; - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; - lineNr += startNewlines; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,lineNr) : doc; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, (yyextra->docBlockInBody && yyextra->previous) ? yyextra->previous.get() : yyextra->current.get(), diff --git a/src/scanner.l b/src/scanner.l index c1d2ab6..e63b8a0 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -7020,9 +7020,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief bool needsEntry=FALSE; Markdown markdown(yyextra->yyFileName,lineNr); QCString strippedDoc = stripIndentation(doc); - int startNewlines = 0; - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,startNewlines) : strippedDoc; - lineNr += startNewlines; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(), diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp index 50790e8..7c83d52 100644 --- a/src/vhdljjparser.cpp +++ b/src/vhdljjparser.cpp @@ -397,18 +397,18 @@ void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief) s->current->docLine = p->yyLineNr; } - + Markdown markdown(p->yyFileName,p->iDocLine); - int startNewlines = 0; - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; + int lineNr = p->iDocLine; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,lineNr) : doc; while (p->commentScanner.parseCommentBlock( p->thisParser, s->current.get(), processedDoc, // text p->yyFileName, // file - p->iDocLine, // line of block start + lineNr, // line of block start brief, 0, FALSE, -- cgit v0.12