From 6b13bce96c7845c139b7e481c49d5d540f6633d7 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 25 Sep 2020 18:43:14 +0200 Subject: No warning for unbalanced brackets in markdown When we have the input files qq.md. ``` @page xxx0 yyy0 @} Start of text @page xxx1 yyy1 @{ Start of text ``` and qqh.h: ``` /** @page xxxh0 yyyh0 @} Start of texth */ /** @page xxxh1 yyyh1 @{ Start of texth */ ``` we get the warnings: ``` qq.md:3: warning: unbalanced grouping commands qqh.h:4: warning: unbalanced grouping commands qqh.h:15: warning: end of file with unbalanced grouping commands ``` ``` so we are missing ``` qq.md:9: warning: end of file with unbalanced grouping commands ``` due to the fact that the closing routine was not called (also the open routine was not called, always good to call it the set variables to their proper values. --- src/markdown.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/markdown.cpp b/src/markdown.cpp index 8e259a3..e268c48 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2729,6 +2729,7 @@ void MarkdownOutlineParser::parseInput(const char *fileName, } int lineNr=1; + p->commentScanner.enterFile(fileName,lineNr); Protection prot=Public; bool needsEntry = FALSE; int position=0; @@ -2760,6 +2761,7 @@ void MarkdownOutlineParser::parseInput(const char *fileName, { root->moveToSubEntryAndKeep(current); } + p->commentScanner.leaveFile(fileName,lineNr); } void MarkdownOutlineParser::parsePrototype(const char *text) -- cgit v0.12