panoply / vscode-liquid

💧Liquid language support for VS Code
https://marketplace.visualstudio.com/items?itemName=sissel.shopify-liquid
Other
171 stars 22 forks source link

Formatter adding whitespace to JS string #133

Closed davidwarrington closed 1 year ago

davidwarrington commented 1 year ago

Formatter adds space after Liquid tag inside JS string. I've not made any configuration changes so this is using the default settings.

I have the following code:

<script>
  document.body.style.setProperty('--pg-MobileReassurances-fontSize', '{{ section.settings.font_size }}px');
</script>

After saving it becomes the following and breaks existing CSS because of the whitespace it has introduced:

<script>
  document.body.style.setProperty('--pg-MobileReassurances-fontSize', '{{ section.settings.font_size }} px');
</script>
panoply commented 1 year ago

This one is solved in #138