Closed andyxmas closed 11 months ago
Thanks for reporting :)
Any news about this?
took a stab in fixing the bug on a surface level ☝️
the bug triggers if the script tag contents contain both liquid tags and the backtick for template literals, in addition to the newline, the backtick also disables prettifying (or at least, indentation) of the block (but that's for another issue).
I'm also having this issue, every time a script tag contains backticks
I believe this was fixed in the latest version by https://github.com/Shopify/theme-tools/pull/163
Describe the bug In some liquid snippets, examples below, the when running prettier, have extra line spaces added every time.
Unformatted source I've done my best to make this as minimal as possible.
Expected output No change, or potentially some formatting, but not additional linespaces.
Actual output
Debugging information
Additional context
`` backticks, the issue does not present. Also, if I remove the
{% if ... %}` statement.