mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
searchtools.js_t: don't stem words if it cuts them to less than 3 characters #1529
This commit is contained in:
parent
475ebf6c36
commit
e23a099cba
@ -159,6 +159,10 @@ var Search = {
|
|||||||
}
|
}
|
||||||
// stem the word
|
// stem the word
|
||||||
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
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;
|
var toAppend;
|
||||||
// select the correct list
|
// select the correct list
|
||||||
if (word[0] == '-') {
|
if (word[0] == '-') {
|
||||||
|
Loading…
Reference in New Issue
Block a user