Skip to content

Commit

Permalink
fix: excessive splitting in parseQuery
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal authored and krisk committed May 3, 2022
1 parent 30f1026 commit 2c78022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search/extended/parseQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const searchers = [
const searchersLen = searchers.length

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

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

0 comments on commit 2c78022

Please sign in to comment.