diff --git a/npm/ng-packs/packages/core/src/lib/utils/string-utils.ts b/npm/ng-packs/packages/core/src/lib/utils/string-utils.ts index 4c4950f58b..a215c5c749 100644 --- a/npm/ng-packs/packages/core/src/lib/utils/string-utils.ts +++ b/npm/ng-packs/packages/core/src/lib/utils/string-utils.ts @@ -17,8 +17,10 @@ export function createTokenParser(format: string) { } export function interpolate(text: string, params: string[]) { - return text - .replace(/(['"]?\{\s*(\d+)\s*\}['"]?)/g, (_, match, digit) => params[digit] ?? match) + return text + .replace(/(['"])?\{\s*(\d+)\s*\}\1/g, (_, quote, digit) => + (quote ? quote : '') + (params[digit] ?? `{${digit}}`) + (quote ? quote : '') + ) .replace(/\s+/g, ' '); }