From 9356e631875e2c198ded4c7edd3e4503dcc941bb Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Thu, 4 Dec 2014 01:00:49 +0200 Subject: Fixes #176: remove trailing space from search --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main.js') diff --git a/src/main.js b/src/main.js index e3c5599f..1d27eda3 100644 --- a/src/main.js +++ b/src/main.js @@ -37,8 +37,8 @@ function(textanalysis_ui, textanalysis, buttons, history, drag_n_drop, }; // TODO: move me somewhere $('#search').on('input', function(e) { - var text = this.value, - r = new RegExp(text.trim()); // TODO fails for quotes + var text = this.value.trim(), + r = new RegExp(text); // TODO fails for quotes if (text.length > 0) { selection.byVisitors(function (n) { return n.name.match(r); }); } else { -- cgit v1.3.1