From f236674c1ec1ec05ace0f70b7f5fe11189ca171d Mon Sep 17 00:00:00 2001 From: Roman Axelrod Date: Wed, 14 Dec 2022 12:51:43 +0200 Subject: [PATCH] Update logic of hubspot builder. --- platforms/hubspot/hubspot-email-adapter.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platforms/hubspot/hubspot-email-adapter.js b/platforms/hubspot/hubspot-email-adapter.js index 14a0f32..786a19c 100644 --- a/platforms/hubspot/hubspot-email-adapter.js +++ b/platforms/hubspot/hubspot-email-adapter.js @@ -250,7 +250,8 @@ export async function buildHubspotJSONFiles(distPath, metaData) { export function handlebarsToHubl(handlebars) { handlebars = handlebars.replace(/{{#if /g, '{% if module.'); handlebars = handlebars.replace(/{{\/if}}/g, '{% endif %}'); - handlebars = handlebars.replace(/{{#each /g, '{% for module.'); + handlebars = handlebars.replace(/{{#each /g, '{% for item in module.'); + handlebars = handlebars.replace(/{{ else }}/g, '{% else %}'); handlebars = handlebars.replace(/{{\/each}}/g, '{% endfor %}'); handlebars = handlebars.replace(/{{base_url}}/g, ''); handlebars = handlebars.replace(/{esc_attr /g, '{'); @@ -262,6 +263,7 @@ export function handlebarsToHubl(handlebars) { handlebars = handlebars.replace(/}}}/g, '}}'); handlebars = handlebars.replace(/{{/g, '{{module.'); handlebars = handlebars.replace(/{{module. /g, '{{ module.'); + handlebars = handlebars.replace(/.url/g, '.src'); return handlebars; }