1
0

Fix implicit global variable.

This commit is contained in:
Brad Vogel
2016-10-28 13:11:38 -07:00
parent 09a1110f40
commit 23b36fd086

View File

@@ -31,6 +31,7 @@ exports.parse = function (string, options) {
var terms = [];
// Get a list of search terms respecting single and double quotes
var regex = /(\S+:'(?:[^'\\]|\\.)*')|(\S+:"(?:[^"\\]|\\.)*")|\S+|\S+:\S+/g;
var match;
while ((match = regex.exec(string)) !== null) {
var term = match[0];
var sepIndex = term.indexOf(':');