Update logic of hubspot builder.

This commit is contained in:
2022-12-14 12:51:43 +02:00
parent e9827fdd88
commit f236674c1e
+3 -1
View File
@@ -250,7 +250,8 @@ export async function buildHubspotJSONFiles(distPath, metaData) {
export function handlebarsToHubl(handlebars) { export function handlebarsToHubl(handlebars) {
handlebars = handlebars.replace(/{{#if /g, '{% if module.'); handlebars = handlebars.replace(/{{#if /g, '{% if module.');
handlebars = handlebars.replace(/{{\/if}}/g, '{% endif %}'); 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(/{{\/each}}/g, '{% endfor %}');
handlebars = handlebars.replace(/{{base_url}}/g, ''); handlebars = handlebars.replace(/{{base_url}}/g, '');
handlebars = handlebars.replace(/{esc_attr /g, '{'); handlebars = handlebars.replace(/{esc_attr /g, '{');
@@ -262,6 +263,7 @@ export function handlebarsToHubl(handlebars) {
handlebars = handlebars.replace(/}}}/g, '}}'); handlebars = handlebars.replace(/}}}/g, '}}');
handlebars = handlebars.replace(/{{/g, '{{module.'); handlebars = handlebars.replace(/{{/g, '{{module.');
handlebars = handlebars.replace(/{{module. /g, '{{ module.'); handlebars = handlebars.replace(/{{module. /g, '{{ module.');
handlebars = handlebars.replace(/.url/g, '.src');
return handlebars; return handlebars;
} }