diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2020-06-15 17:25:46 (GMT) |
---|---|---|
committer | Dimitri van Heesch <doxygen@gmail.com> | 2020-06-16 19:30:41 (GMT) |
commit | e922facbb92cda058eae33f58f7640be8d1fb5b8 (patch) | |
tree | ae45b9db9d6ed339b28ba22199e75bcf16993318 /src/vhdljjparser.cpp | |
parent | 3040df2f0aa29a4207de5b37da1d20e3d27340bb (diff) | |
download | Doxygen-e922facbb92cda058eae33f58f7640be8d1fb5b8.zip Doxygen-e922facbb92cda058eae33f58f7640be8d1fb5b8.tar.gz Doxygen-e922facbb92cda058eae33f58f7640be8d1fb5b8.tar.bz2 |
Refactor: modernize markdown and make it thread-safe
Diffstat (limited to 'src/vhdljjparser.cpp')
-rw-r--r-- | src/vhdljjparser.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp index 38aa641..aa566ae 100644 --- a/src/vhdljjparser.cpp +++ b/src/vhdljjparser.cpp @@ -271,7 +271,7 @@ int VHDLOutlineParser::checkInlineCode(QCString &doc) QRegExp cend("[\\s ]*[\\\\@]endcode"); QRegExp cbrief("[\\\\@]brief"); int index = doc.find(cs); - + if (doc.contains(cend) > 0) return 1; @@ -284,16 +284,16 @@ int VHDLOutlineParser::checkInlineCode(QCString &doc) int com = p->inputString.find(p->strComment.data()); int ref = p->inputString.find(cend, p->code + 1); int len = p->strComment.size(); - + int ll = com + len; int diff = ref - ll - 3; QCString code = p->inputString.mid(ll, diff); - int iLine = 0; + int iLine = 0; code = stripLeadingAndTrailingEmptyLines(code, iLine); int val = code.contains('\n'); VhdlDocGen::prepareComment(p->strComment); QCStringList ql = QCStringList::split('\n', p->strComment); - + QCString co; QCString na; for (QCString qcs : ql) @@ -406,8 +406,9 @@ void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief) //int position=0; - QCString processedDoc = processMarkdownForCommentBlock(doc, p->yyFileName, p->iDocLine); - + Markdown markdown(p->yyFileName,p->iDocLine); + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc) : doc; + while (p->commentScanner.parseCommentBlock( p->thisParser, s->current.get(), @@ -419,7 +420,8 @@ void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief) FALSE, protection, position, - needsEntry)) + needsEntry, + Config_getBool(MARKDOWN_SUPPORT))) { if (needsEntry) newEntry(); |