Shopify / prettier-plugin-liquid

Prettier Liquid/HTML plugin
https://npm.im/@shopify/prettier-plugin-liquid
MIT License
93 stars 15 forks source link

Fix issue #171 #202

Closed Wilhansen closed 3 months ago

Wilhansen commented 1 year ago

The issue is due to the plugin treating an HtmlRawNode as preformatted text not to be touched the moment it detects the ` character (for template literals) anywhere in the body. Aside from not formatting the contents, it doesn't strip the leading and trailing newlines resulting in compounding new lines everytime prettier is run against the file. This fixes the compounding line issue in particular but does not fix the contents not being prettified when a ` is detected anywhere in the text.

jamesmengo commented 3 months ago

Moving to https://github.com/Shopify/theme-tools, please re-open there if still relevant!