fix(tools): replace replaceAll with replace for ES2020 compatibility
Use regex replace instead of replaceAll to support older target versions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
ae6d516952
commit
7d04253791
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ function compilePattern(pattern: string): CompiledPattern {
|
|||
const escaped = normalized.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
||||
return {
|
||||
kind: "regex",
|
||||
value: new RegExp(`^${escaped.replaceAll("\\*", ".*")}$`),
|
||||
value: new RegExp(`^${escaped.replace(/\\\*/g, ".*")}$`),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue