summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-12-04 01:00:49 +0200
committerAlon Levy <alon@pobox.com>2014-12-04 01:20:18 +0200
commit9356e631875e2c198ded4c7edd3e4503dcc941bb (patch)
tree73cfa6eb19416921d330ef5dcae479efac2ffd8f /src
parent3f8672553a2f43518e85acb3b9b9afb16597e145 (diff)
Fixes #176: remove trailing space from search
Diffstat (limited to 'src')
-rw-r--r--src/main.js4
1 files changed, 2 insertions, 2 deletions
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 {