SubEthaEdit
SubEthaEdit copied to clipboard
Re-Indent doesn't cope well with HTML5 elements that don't require close tags
See attached images.
If I add a trailing /
to the meta
, link
, and source
tags, re-indent works. But they should not be necessary.

This is with App Store version 5.1.7 (9734) on macOS 11.1 (20C69).
Actually I rather liked it that way so the html gets improved when using the feature, and you quickly can spot missing closures on the folding ribbon. But of course there would be the possiblity for an option to not do that.
And of course all of this is from a time when we thought XHTML would win eventually, and there the closing is all but optional.
Ah, it is even worse. It is optional in spec, and in HTML it was technically invalid even to close such a tag.
We should probably make XHTML a different mode then, and make HTML adhere to the HTML5 rules.
See http://xahlee.info/js/html5_non-closing_tag.html