aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/completion.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/completion.js b/lib/completion.js
index 935773a5..8b63fab0 100644
--- a/lib/completion.js
+++ b/lib/completion.js
@@ -103,14 +103,14 @@ var completion = (function() {
// build up a regex for fuzzy matching. This is the fastest method I checked (faster than:
// string building, splice, concat, multi-level join)
var regex = ['^'];
-   for (var i = 0; i < query.length; ++i) {
-     regex.push('([^');
-     regex.push(query[i]);
-     regex.push(']*)(');
-     regex.push(query[i]);
-     regex.push(')');
-   }
-   regex.push('(.*)$');
+ for (var i = 0; i < query.length; ++i) {
+ regex.push('([^');
+ regex.push(query[i]);
+ regex.push(']*)(');
+ regex.push(query[i]);
+ regex.push(')');
+ }
+ regex.push('(.*)$');
self.matcherCache[query] = new RegExp(regex.join(''), 'i');
}
return self.matcherCache[query];