g-plane / markup_fmt

Configurable HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks and Vento formatter with dprint integration.
https://dprint.dev/plugins/markup_fmt/
MIT License
100 stars 9 forks source link

Converge in one pass when self closing tag containing empty spaces #34

Closed UnknownPlatypus closed 3 months ago

UnknownPlatypus commented 4 months ago

This allows formatting of empty self closing tag to converge in one pass, previously it required 2 like below:

# `file.html`
<svg>
    <circle>
    </circle>
</svg>

# First markup_fmt run with svg.selfCLosing = true
<svg>
    <circle></circle>
</svg>

# Second markup_fmt run with svg.selfCLosing = true
<svg>
    <circle />
</svg>