fix: use replaceAll
This commit is contained in:
parent
416928f718
commit
f075cd50d3
|
@ -23,7 +23,7 @@ export function wildcardMatch(pattern: string, target: string): boolean {
|
|||
// escape everything else
|
||||
pattern = pattern.split("*").map(_escapeRegex).join(".*");
|
||||
// treat `,` as `|`
|
||||
pattern = pattern.replace(",", "|");
|
||||
pattern = pattern.replaceAll(",", "|");
|
||||
// add anchors
|
||||
pattern = `^(${pattern})$`;
|
||||
|
||||
|
|
Loading…
Reference in New Issue