Open Arifursdev opened 7 months ago
Hey @Arifursdev,
Yeah, I dropped support for this in v4 because Æsthetic applies whitespace trims using the Liquid formatting rule delimiterTrims
(see here). Extending the snippets feels a tad extraneous.
Hello @panoply , I see, I don't use formatter for liquid files. and there are cases when sometimes the whitespace will not be used, eg:
<div class="classA{% if true %} ClassB{% endif %}">Test</div>
// <div class="classA ClassB">Test</div> ✅
<div class="classA{%- if true -%} ClassB{%- endif -%}">Test</div>
// <div class="classAClassB">Test</div> ❌
so I don't know if the formatter has such rules to avoid making all of them have whitespace trimmed... imo formatter is a different thing than having snippets where we can choose which one we want to use depending on situation.
I think I will just go back to prev. version for the snippets or add them locally for myself.
I think prev. version of the plugin had whitespace control hyphen snippets. https://shopify.github.io/liquid/basics/whitespace/
// whitespace control: