Changed regex

This commit is contained in:
marcdeb1 2018-10-24 12:21:33 +02:00
parent f18155d52b
commit c6b4d63eb2

View file

@ -319,7 +319,7 @@ function getWashedQuery (query) {
query = sentence.join(' ');
// remove all words < 3 in length
return query.replace(/(\b(\w{1,2})\b(\s|$))/g, '');
return query.replace(/((\s|^)\b(\w{1,2})\b)/g, '').trim();
}
function getEscapedQuery (query) {