aboutsummaryrefslogtreecommitdiffstats
path: root/webui/src/pages/list/Filter.tsx
diff options
context:
space:
mode:
authorAien Saidi <aien.saidi@gmail.com>2021-03-24 18:12:05 +0100
committerSascha <GlancingMind@outlook.com>2021-04-07 13:08:26 +0200
commitbff9fa673a4b481511fcc81bfd50ee74487788ab (patch)
treec14cd86474f8feb19069f9d7a51a67fd295ae361 /webui/src/pages/list/Filter.tsx
parent248201bcbdcd0415870a5f75211bf3a3108777c1 (diff)
downloadgit-bug-bff9fa673a4b481511fcc81bfd50ee74487788ab.tar.gz
fix: issue with regex
Diffstat (limited to 'webui/src/pages/list/Filter.tsx')
-rw-r--r--webui/src/pages/list/Filter.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/webui/src/pages/list/Filter.tsx b/webui/src/pages/list/Filter.tsx
index 54b2262b..2ba6ffaf 100644
--- a/webui/src/pages/list/Filter.tsx
+++ b/webui/src/pages/list/Filter.tsx
@@ -28,7 +28,7 @@ function parse(query: string): Query {
const params: Query = {};
// TODO: support escaping without quotes
- const re = /(\w+):([A-Za-z0-9-]+|(["'])(([^\3]|\\.)*)\3)+/g;
+ const re = /(\w+):([A-Za-z0-9-]+|"([^"]*)")/g;
let matches;
while ((matches = re.exec(query)) !== null) {
if (!params[matches[1]]) {
@@ -36,8 +36,8 @@ function parse(query: string): Query {
}
let value;
- if (matches[4]) {
- value = matches[4];
+ if (matches[3]) {
+ value = matches[3];
} else {
value = matches[2];
}