djLint
djLint copied to clipboard
[FEATURE] [FORMATTER] "for" is formatted in a single line when "for else" is not
Feature Request
{% for (id, name) in accounts %}
<option value="{{ id }}">{{ name }}</option>
{% endfor %}
{% for (id, name) in campaigns %}
<option value="{{ id }}">{{ name }}</option>
{% else %}
<option selected hidden value="">no campaigns found</option>
{% endfor %}
will be formatted to
{% for (id, name) in accounts %}<option value="{{ id }}">{{ name }}</option>{% endfor %}
{% for (id, name) in campaigns %}
<option value="{{ id }}">{{ name }}</option>
{% else %}
<option selected hidden value="">no campaigns found</option>
{% endfor %}
can we let the for be in multiline form for readability?
also, is there a way to disable the stripping of multiple breaklines? it is putting the 2 fors together and that breaks readability also
Thanks for opening your first issue here!

Hey, both of these are config options. The first is max line length, and the second is max blank lines.