Skip to content

Commit 2c78022

Browse files
indutny-signalkrisk
authored andcommitted
fix: excessive splitting in parseQuery
1 parent 30f1026 commit 2c78022

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/search/extended/parseQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const searchers = [
2222
const searchersLen = searchers.length
2323

2424
// Regex to split by spaces, but keep anything in quotes together
25-
const SPACE_RE = / +(?=([^\"]*\"[^\"]*\")*[^\"]*$)/
25+
const SPACE_RE = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/
2626
const OR_TOKEN = '|'
2727

2828
// Return a 2D array representation of the query, for simpler parsing.

0 commit comments

Comments
 (0)