diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-10-29 19:18:24 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2018-10-29 19:18:24 (GMT) |
commit | 88885c2fa885978cf958bebb6d312e1e0854a864 (patch) | |
tree | ff826a65592f2ca578dd226406c4d39adfe19d5c /src/util.cpp | |
parent | 49b63cdcaf884ae2d676749915f003608bd9dc13 (diff) | |
parent | 080389ee153981831ea36e14726b49f756e081bf (diff) | |
download | Doxygen-88885c2fa885978cf958bebb6d312e1e0854a864.zip Doxygen-88885c2fa885978cf958bebb6d312e1e0854a864.tar.gz Doxygen-88885c2fa885978cf958bebb6d312e1e0854a864.tar.bz2 |
Merge branch 'feature/bug_latex_index_sorting' of https://github.com/albert-github/doxygen into albert-github-feature/bug_latex_index_sorting
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp index c931214..0a10e74 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6927,11 +6927,37 @@ void filterLatexString(FTextStream &t,const char *str, } } +static void reFilterLatexString(FTextStream &t,const char *str) +{ + if (str==0) return; + const unsigned char *p=(const unsigned char *)str; + unsigned char c; + unsigned char pc='\0'; + while (*p) + { + c=*p++; + + switch(c) + { + case '\\': + if (*p == '+') p++; + else t << '\\'; + break; + default: + t << (char)c; + break; + } + pc = c; + } +} + QCString latexEscapeLabelName(const char *s,bool insideTabbing) { QGString result; + QGString result1; QCString tmp(qstrlen(s)+1); FTextStream t(&result); + FTextStream t1(&result1); const char *p=s; char c; int i; @@ -6961,7 +6987,13 @@ QCString latexEscapeLabelName(const char *s,bool insideTabbing) break; } } - return result.data(); + if (!insideTabbing) + { + reFilterLatexString(t1,result.data()); + return result1.data(); + } + else + return result.data(); } QCString latexEscapeIndexChars(const char *s,bool insideTabbing) |