summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-04-08 18:33:10 (GMT)
committerGitHub <noreply@github.com>2021-04-08 18:33:10 (GMT)
commitfc2e284f9657abbe343d41b4a7922d5c4d788b11 (patch)
treef12aa758254da0c5e8285c26d979fae022abb963
parent6f2aae9b7b13946aa9c676684694b3869a65c959 (diff)
parent4048d7e0ee3fb73bef0b5496a6046af37102aa79 (diff)
downloadDoxygen-fc2e284f9657abbe343d41b4a7922d5c4d788b11.zip
Doxygen-fc2e284f9657abbe343d41b4a7922d5c4d788b11.tar.gz
Doxygen-fc2e284f9657abbe343d41b4a7922d5c4d788b11.tar.bz2
Merge pull request #8486 from albert-github/feature/issue_8485
issue #8485 The browser based search doesn't handle underscores correctly
-rw-r--r--src/searchindex.cpp2
-rw-r--r--src/util.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 9afb7cb..cd048c4 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -555,7 +555,7 @@ QCString searchId(const Definition *d)
TextStream t;
for (size_t i=0;i<s.length();i++)
{
- if (isId(s[i]))
+ if (isIdJS(s[i]))
{
t << s[i];
}
diff --git a/src/util.h b/src/util.h
index 4d27a4c..ab30c61 100644
--- a/src/util.h
+++ b/src/util.h
@@ -191,6 +191,10 @@ inline bool isId(int c)
{
return c=='_' || c>=128 || c<0 || isalnum(c);
}
+inline bool isIdJS(int c)
+{
+ return c>=128 || c<0 || isalnum(c);
+}
QCString removeRedundantWhiteSpace(const QCString &s);