Pinegrow with Template Engines (Handlebars, Mustache, etc)

I’ve adopted Pinegrow as my go-to front-end design tool, and have been using it with mustache so far.

There was an issue with Pinegrow autocorrecting and removing some of the vital syntax:
ie: Pinegrow would remove all the / 's from any template code : {{/payload}} for example, and leaving it looking like this: {{ payload}}

I’ve had to develop a work around “fix” function in my workflow prior to template rendering and sending back to the client a response,

Here is a sample of my “fix” code for anyone who may be experiencing the same situation.

msg.payload = msg.payload.replace(/{{ /g, "{{/")
msg.payload = msg.payload.replace('{{="" ', "{{/");
msg.payload = msg.payload.replace('}}=""', "}}/");

Basically the msg.payload contains the whole HTML with the templating code,
When Pinegrow saves, it takes out the / as stated, and then when my server loads this code, it works by doing this “fix”, by looking for bare brackets without the slash, and then replacing them with the slash in tact.

I’ve been happy with the outcome of this until recently where I’m stuck in a situation where all my menus / navbar are dynamically loaded (by means of a rendered mustache template inside a Pinegrow navbar component), which works fine, until I try to do client side rendering of these templates.

My problem is when I have a <template> of HTML, that too gets rendered, and those template placeholders get rendered out of view from the server side rendering. I remove the server side rendering, and opt for a client side, but then my dynamic menus are compromised.

I’ve noticed some pug capabilities with Pinegrow, though I’ve not explored them, as I’ve not dove into pug, though I imagine it’s easy to grasp, I’d need to update a lot of template code if I went that route.

I don’t want this thread to turn into a multi-topic post, so I just want to share my “fix” and was just curious if anyone experienced my situation.