First working version with multi-rendering

This commit is contained in:
Pieter Vander Vennet 2021-10-22 01:07:32 +02:00
parent b9b8a5c71a
commit 0c0ef48a96
16 changed files with 228 additions and 135 deletions

View file

@ -165,8 +165,10 @@ export class Utils {
return [a.substr(0, index), a.substr(index + sep.length)];
}
public static SubstituteKeys(txt: string, tags: any) {
public static SubstituteKeys(txt: string | undefined, tags: any): string | undefined {
if (txt === undefined) {
return undefined
}
const regex = /.*{([^}]*)}.*/
let match = txt.match(regex)
@ -176,7 +178,7 @@ export class Utils {
txt = txt.replace("{" + key + "}", tags[key] ?? "")
match = txt.match(regex)
}
return txt;
}