Remove Spaces inside tripe brackets Handlebars | HTML Language Features in Script Tag | Vs code

73 Views Asked by At

I'm having issues with Handlebar triple brackets formatting when inside a script tag. Attaching a gif for this issue as it's hard to explain in words.

Any help would be appreciated.

<script>
   window.cyrTabs = {{ {JSONstringify slice} }}
</script>

enter image description here

1

There are 1 best solutions below

0
Rehan H On BEST ANSWER

I've found a workaround for now. Turned this window.cyrTabs = {{ {JSONstringify slice} }} into var cyrTabs = {{{JSONstringify slice}}}

For some reason, using a var/const/let fixes this issue in VS code.