diff options
Diffstat (limited to 'src/markdown.cpp')
-rw-r--r-- | src/markdown.cpp | 55 |
1 files changed, 11 insertions, 44 deletions
diff --git a/src/markdown.cpp b/src/markdown.cpp index d1a6a63..42ea2ff 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2021,7 +2021,7 @@ static int writeBlockQuote(GrowBuf &out,const char *data,int size) out.addStr("<blockquote>\n"); } } - else if (level<curLevel) // quote level descreased => add end markers + else if (level<curLevel) // quote level decreased => add end markers { for (l=level;l<curLevel;l++) { @@ -2176,7 +2176,7 @@ static void writeFencedCodeBlock(GrowBuf &out,const char *data,const char *lng, } out.addStr(data+blockStart,blockEnd-blockStart); out.addStr("\n"); - out.addStr("@endcode"); + out.addStr("@endcode\n"); } static QCString processQuotations(const QCString &s,int refIndent) @@ -2470,7 +2470,7 @@ static QCString detab(const QCString &s,int &refIndent) while (stop--) out.addChar(' '); } break; - case '\n': // reset colomn counter + case '\n': // reset column counter out.addChar(c); col=0; break; @@ -2576,13 +2576,13 @@ QCString markdownFileNameToId(const QCString &fileName) } -void MarkdownFileParser::parseInput(const char *fileName, +void MarkdownOutlineParser::parseInput(const char *fileName, const char *fileBuf, - const std::unique_ptr<Entry> &root, + const std::shared_ptr<Entry> &root, bool /*sameTranslationUnit*/, QStrList & /*filesInSameTranslationUnit*/) { - std::unique_ptr<Entry> current = std::make_unique<Entry>(); + std::shared_ptr<Entry> current = std::make_shared<Entry>(); current->lang = SrcLangExt_Markdown; current->fileName = fileName; current->docFile = fileName; @@ -2660,47 +2660,14 @@ void MarkdownFileParser::parseInput(const char *fileName, g_indentLevel=0; } -void MarkdownFileParser::parseCode(CodeOutputInterface &codeOutIntf, - const char *scopeName, - const QCString &input, - SrcLangExt lang, - bool isExampleBlock, - const char *exampleName, - FileDef *fileDef, - int startLine, - int endLine, - bool inlineFragment, - const MemberDef *memberDef, - bool showLineNumbers, - const Definition *searchCtx, - bool collectXRefs - ) +void MarkdownOutlineParser::parsePrototype(const char *text) { - ParserInterface *pIntf = Doxygen::parserManager->getParser("*.cpp"); - if (pIntf!=this) + OutlineParserInterface &intf = Doxygen::parserManager->getOutlineParser("*.cpp"); + if (&intf!=this) { - pIntf->parseCode( - codeOutIntf,scopeName,input,lang,isExampleBlock,exampleName, - fileDef,startLine,endLine,inlineFragment,memberDef,showLineNumbers, - searchCtx,collectXRefs); + intf.parsePrototype(text); } } -void MarkdownFileParser::resetCodeParserState() -{ - ParserInterface *pIntf = Doxygen::parserManager->getParser("*.cpp"); - if (pIntf!=this) - { - pIntf->resetCodeParserState(); - } -} - -void MarkdownFileParser::parsePrototype(const char *text) -{ - ParserInterface *pIntf = Doxygen::parserManager->getParser("*.cpp"); - if (pIntf!=this) - { - pIntf->parsePrototype(text); - } -} +//------------------------------------------------------------------------ |