#353: Strip leading and trailing whitespace when extracting search words in the search function.

This commit is contained in:
Georg Brandl 2010-04-04 18:40:06 +02:00
parent 02d6640df3
commit e8fe8584e4
2 changed files with 6 additions and 0 deletions

View File

@ -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)
============================

View File

@ -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