diff options
author | albert-github <albert.tests@gmail.com> | 2018-08-30 11:21:18 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-08-30 11:21:18 (GMT) |
commit | 080389ee153981831ea36e14726b49f756e081bf (patch) | |
tree | b93969d2fca8886a5186b840a2582a6588174c87 /src | |
parent | a3ef054f5d2af360fa7541e01a6de102d1c7c147 (diff) | |
download | Doxygen-080389ee153981831ea36e14726b49f756e081bf.zip Doxygen-080389ee153981831ea36e14726b49f756e081bf.tar.gz Doxygen-080389ee153981831ea36e14726b49f756e081bf.tar.bz2 |
Sorting of index in case of LaTex
In case of LaTeX the sorting was so that lowercase came after uppercase e.g.: `username` came after `useSsl`, although the index should be case insensitive.
Te problem was that the sort key was filtered in such a way that a.o. uppercase symbols were preceded by `\+` for hyphenation. The key doesn't need this hyphenation (as there is a separate field for the display name).
The `\+` has been filtered out now.
Diffstat (limited to 'src')
-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 b387a84..b524863 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6865,11 +6865,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; @@ -6899,7 +6925,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) |