From 2c78022c6ccb424e1013dc486649a7d6388df193 Mon Sep 17 00:00:00 2001 From: Fedor Indutnyy Date: Mon, 4 Apr 2022 13:36:29 -0700 Subject: [PATCH] fix: excessive splitting in parseQuery --- src/search/extended/parseQuery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/extended/parseQuery.js b/src/search/extended/parseQuery.js index bfceb135b..507dd7486 100644 --- a/src/search/extended/parseQuery.js +++ b/src/search/extended/parseQuery.js @@ -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.