You've already forked search-query-parser
Fix implicit global variable.
This commit is contained in:
@@ -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(':');
|
||||
|
||||
Reference in New Issue
Block a user