mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#353: Strip leading and trailing whitespace when extracting search words in the search function.
This commit is contained in:
parent
02d6640df3
commit
e8fe8584e4
3
CHANGES
3
CHANGES
@ -1,6 +1,9 @@
|
||||
Release 0.6.6 (in development)
|
||||
==============================
|
||||
|
||||
* #353: Strip leading and trailing whitespace when extracting
|
||||
search words in the search function.
|
||||
|
||||
|
||||
Release 0.6.5 (Mar 01, 2010)
|
||||
============================
|
||||
|
@ -296,6 +296,9 @@ var Search = {
|
||||
var tmp = query.split(/\s+/);
|
||||
var object = (tmp.length == 1) ? tmp[0].toLowerCase() : null;
|
||||
for (var i = 0; i < tmp.length; i++) {
|
||||
// ignore leading/trailing whitespace
|
||||
if (tmp[i] == "")
|
||||
continue;
|
||||
// stem the word
|
||||
var word = stemmer.stemWord(tmp[i]).toLowerCase();
|
||||
// select the correct list
|
||||
|
Loading…
Reference in New Issue
Block a user