trivago / prettier-plugin-twig-melody

Code formatting plugin for Prettier which can handle Twig/Melody templates
Apache License 2.0
155 stars 35 forks source link

Formatting of empty block statements doesn't stabilize on first run #69

Open j2L4e opened 3 years ago

j2L4e commented 3 years ago

An empty block statement needs two prettier runs to stabilize. It should produce a stable version of the code on first run.

Original:

{% block foo %}{% endblock %}

After first run:

{% block foo %}
{% endblock %}

After 2 or more runs (stable):

{% block foo %}

{% endblock %}
rellafella commented 3 years ago

Is there a way to set it so that it stays as:

{% block foo %}
{% endblock %}
luchidalgo commented 2 years ago

Also, can we leave empty blocks on a single line ?