Auto merge of #13448 - yotamofek:python-ext-polyfill-workaround, r=Veykril

Workaround the python vscode extension's polyfill

Fixes #13442

`String.replaceAll` and `String.replace` behave the same when given a (/g-flagged) Regex, so fix is very simple.
This commit is contained in:
bors 2022-10-20 17:59:14 +00:00
commit 7741e3dc73

View File

@ -191,7 +191,7 @@ export class Config {
const VarRegex = new RegExp(/\$\{(.+?)\}/g); const VarRegex = new RegExp(/\$\{(.+?)\}/g);
export function substituteVSCodeVariableInString(val: string): string { export function substituteVSCodeVariableInString(val: string): string {
return val.replaceAll(VarRegex, (substring: string, varName) => { return val.replace(VarRegex, (substring: string, varName) => {
if (typeof varName === "string") { if (typeof varName === "string") {
return computeVscodeVar(varName) || substring; return computeVscodeVar(varName) || substring;
} else { } else {