diff --git a/src/utils/safeCompile.ts b/src/utils/safeCompile.ts index 4956295..1a5b8f2 100644 --- a/src/utils/safeCompile.ts +++ b/src/utils/safeCompile.ts @@ -6,7 +6,7 @@ import Handlebars, { TemplateDelegate } from 'handlebars' * Missing properties resolve to empty string. */ export const safeCompile = (templateSource: string): TemplateDelegate => { - const sanitizedTemplate = templateSource.replaceAll(/{{\s*[\w]+\.\s*}}/, '') // Remove placeholders ending with a dot + const sanitizedTemplate = templateSource.replaceAll(/{{\s*[\w]+\.\s*}}/g, '') // Remove placeholders ending with a dot Handlebars.registerHelper('helperMissing', () => '')