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/docbookvisitor.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/docbookvisitor.cpp')
-rw-r--r-- | src/docbookvisitor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index 64425c6..73db25f 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -472,7 +472,9 @@ DB_VIS_C 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(); @@ -485,7 +487,7 @@ DB_VIS_C 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(), |