diff options
author | albert-github <albert.tests@gmail.com> | 2019-06-06 10:22:42 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-06-06 10:22:42 (GMT) |
commit | 313cc456d52ccf41f7b32adc3d0400cb7992549d (patch) | |
tree | cb32ee79524baadb3538764c75eca46c6babbffa /src/latexdocvisitor.cpp | |
parent | e773e6cb9e117621e06fb81098d33417e8a97720 (diff) | |
download | Doxygen-313cc456d52ccf41f7b32adc3d0400cb7992549d.zip Doxygen-313cc456d52ccf41f7b32adc3d0400cb7992549d.tar.gz Doxygen-313cc456d52ccf41f7b32adc3d0400cb7992549d.tar.bz2 |
issue #7033 Syntax highlighting doesn't work when calling \dontinclude from Markdown files
Don't use the file name extension of the including file but of the included file. In case of no included filename or no extension, fall back of the file extension of the including file.
Diffstat (limited to 'src/latexdocvisitor.cpp')
-rw-r--r-- | src/latexdocvisitor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 2e979bd..f960333 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -566,7 +566,9 @@ void LatexDocVisitor::visit(DocIncOperator *op) pushEnabled(); m_hide = TRUE; } - SrcLangExt langExt = getLanguageFromFileName(m_langExt); + QCString locLangExt = getFileNameExtension(op->includeFileName()); + if (locLangExt.isEmpty()) locLangExt = m_langExt; + SrcLangExt langExt = getLanguageFromFileName(locLangExt); if (op->type()!=DocIncOperator::Skip) { popEnabled(); @@ -579,7 +581,7 @@ void LatexDocVisitor::visit(DocIncOperator *op) fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() ); } - Doxygen::parserManager->getParser(m_langExt) + Doxygen::parserManager->getParser(locLangExt) ->parseCode(m_ci,op->context(),op->text(),langExt, op->isExample(),op->exampleFile(), fd, // fileDef |