Shopify / prettier-plugin-liquid

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

Maintain at most 1 newline between Liquid branches #137

Closed charlespwd closed 1 year ago

charlespwd commented 1 year ago

Sometimes, to enhance readability, it is preferabble to have newlines between branches.

Prettier does that for JS switch and case statements, we now do the same.

{% case foo %}
  {% when bar %}
    <div>Something</div>

  {% when baz %}
    <div>Something else</div>
{% endcase %}

Fixes #132