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/util.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/util.cpp')
-rw-r--r-- | src/util.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index a6ae004..931c07f 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -7432,6 +7432,14 @@ SrcLangExt getLanguageFromFileName(const QCString& fileName) return SrcLangExt_Cpp; // not listed => assume C-ish language. } +QCString getFileNameExtension(QCString fn) +{ + if (fn.isEmpty()) return ""; + int lastDot = fn.findRev('.'); + if (lastDot!=-1) return fn.mid(lastDot); + return ""; +} + //-------------------------------------------------------------------------- MemberDef *getMemberFromSymbol(const Definition *scope,const FileDef *fileScope, |