mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
fix: regex issue
This commit is contained in:
parent
d2845605c2
commit
41ee97a4f6
@ -35,7 +35,7 @@ function parse(query: string): Query {
|
||||
const params: Query = {};
|
||||
|
||||
// TODO: support escaping without quotes
|
||||
const re = /(\w+):([A-Za-z0-9-]+|"([^"]*)")/g;
|
||||
const re = /(\w+):([A-Za-z0-9-]+|(["'])(([^\3]|\\.)*)\3)+/g;
|
||||
let matches;
|
||||
while ((matches = re.exec(query)) !== null) {
|
||||
if (!params[matches[1]]) {
|
||||
@ -43,8 +43,8 @@ function parse(query: string): Query {
|
||||
}
|
||||
|
||||
let value;
|
||||
if (matches[3]) {
|
||||
value = matches[3];
|
||||
if (matches[4]) {
|
||||
value = matches[4];
|
||||
} else {
|
||||
value = matches[2];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user