Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-03-21 19:15:18 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2022-03-21 19:15:18 +0300
commitc77ecf5e078f2ba6c856c6c8d0c00866aeda3207 (patch)
tree87e6690dde133cef35cd091e0e5b624eb1c956b6
parent1e1f8e218046cbcda69be1f58234324fc48c7db4 (diff)
Fix #10277: html search: Could not search short words (ex. "use")
-rw-r--r--CHANGES1
-rw-r--r--sphinx/themes/basic/static/searchtools.js4
2 files changed, 1 insertions, 4 deletions
diff --git a/CHANGES b/CHANGES
index 3f0f9a0e1..0b41da646 100644
--- a/CHANGES
+++ b/CHANGES
@@ -34,6 +34,7 @@ Bugs fixed
``no-value`` option
* #9971: autodoc: TypeError is raised when the target object is annotated by
unhashable object
+* #10277: html search: Could not search short words (ex. "use")
* #9529: LaTeX: named auto numbered footnote (ex. ``[#named]``) that is referred
multiple times was rendered to a question mark
* #9924: LaTeX: multi-line :rst:dir:`cpp:function` directive has big vertical
diff --git a/sphinx/themes/basic/static/searchtools.js b/sphinx/themes/basic/static/searchtools.js
index 5b48b5d1b..0a44e8582 100644
--- a/sphinx/themes/basic/static/searchtools.js
+++ b/sphinx/themes/basic/static/searchtools.js
@@ -172,10 +172,6 @@ var Search = {
}
// stem the word
var word = stemmer.stemWord(tmp[i].toLowerCase());
- // prevent stemmer from cutting word smaller than two chars
- if(word.length < 3 && tmp[i].length >= 3) {
- word = tmp[i];
- }
var toAppend;
// select the correct list
if (word[0] == '-') {