From c6b4d63eb24005f926480de468d56d3a44305970 Mon Sep 17 00:00:00 2001 From: marcdeb1 Date: Wed, 24 Oct 2018 12:21:33 +0200 Subject: [PATCH] Changed regex --- server/controllers/lighthouse.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/controllers/lighthouse.js b/server/controllers/lighthouse.js index a004383..b24badd 100644 --- a/server/controllers/lighthouse.js +++ b/server/controllers/lighthouse.js @@ -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) {