-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
I like to keep my html-code separated from twig-code with blank lines.
<section>
{% if condition %}
{% set var = value %}
{% endif %}
<div class="container">
{{ var }}
</div>
</section>
However the plugin ignores my single blank line formatting and removes some of them. And although it's compact, it's not "pretty". I don't see why there the blank after the if statement is kept while others are removed.
<section>
{% if condition %}
{% set var = value %}
{% endif %}
<div class="container">
{{ var }}
</div>
</section>I think this is wrong, as the official prettier docs state that prettier collapses multiple blank lines into one, but single empty lines are allowed.
Now I understand changing this might impact other codebases heavily, so I'd like to see a twigAllowSingleEmptyLines option or something like that.
barberob
Metadata
Metadata
Assignees
Labels
No labels