Make scope capture substitution regex global
Add the global modifier to the regex that handles scope name capture substitutions for instances where more than one substitution exists. Fixes #147
This commit is contained in:
Родитель
47502666f8
Коммит
357b5996fa
|
@ -54,7 +54,7 @@ export function basename(path: string): string {
|
|||
}
|
||||
}
|
||||
|
||||
let CAPTURING_REGEX_SOURCE = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/;
|
||||
let CAPTURING_REGEX_SOURCE = /\$(\d+)|\${(\d+):\/(downcase|upcase)}/g;
|
||||
|
||||
export class RegexSource {
|
||||
|
||||
|
@ -62,6 +62,7 @@ export class RegexSource {
|
|||
if (regexSource === null) {
|
||||
return false;
|
||||
}
|
||||
CAPTURING_REGEX_SOURCE.lastIndex = 0;
|
||||
return CAPTURING_REGEX_SOURCE.test(regexSource);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче