diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 10:50:10 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 10:50:10 +0900 |
commit | 738086af77ab085837d0044a33a5d954a3edc6f5 (patch) | |
tree | 3b965243967bdf1aab50ec3dfe74ebdaf75b6942 /src/search.js | |
parent | 835421dad74e8989002b592f703a23d87f211df0 (diff) | |
download | doxygen-738086af77ab085837d0044a33a5d954a3edc6f5.tar.gz doxygen-738086af77ab085837d0044a33a5d954a3edc6f5.tar.bz2 doxygen-738086af77ab085837d0044a33a5d954a3edc6f5.zip |
Imported Upstream version 1.8.6upstream/1.8.6
Diffstat (limited to 'src/search.js')
-rw-r--r-- | src/search.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/search.js b/src/search.js index 3ed3f90..10cee88 100644 --- a/src/search.js +++ b/src/search.js @@ -5,7 +5,7 @@ function convertToId(search) { var c = search.charAt(i); var cn = c.charCodeAt(0); - if (c.match(/[a-z0-9]/)) + if (c.match(/[a-z0-9\u0080-\uFFFF]/)) { result+=c; } @@ -310,22 +310,20 @@ function SearchBox(name, resultsPath, inFrame, label) var searchValue = this.DOMSearchField().value.replace(/^ +/, ""); var code = searchValue.toLowerCase().charCodeAt(0); - var hexCode; - if (code<16) + var idxChar = searchValue.substr(0, 1).toLowerCase(); + if ( 0xD800 <= code && code <= 0xDBFF && searchValue > 1) // surrogate pair { - hexCode="0"+code.toString(16); - } - else - { - hexCode=code.toString(16); + idxChar = searchValue.substr(0, 2); } var resultsPage; var resultsPageWithSearch; var hasResultsPage; - if (indexSectionsWithContent[this.searchIndex].charAt(code) == '1') + var idx = indexSectionsWithContent[this.searchIndex].indexOf(idxChar); + if (idx!=-1) { + var hexCode=idx.toString(16); resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; resultsPageWithSearch = resultsPage+'?'+escape(searchValue); hasResultsPage = true; |