For those interested:
What is a void element?
Trailing slash has no effect
Trailing slash interacts badly with unquoted attribute values
Perhaps you can adapt the Minify HTML Plugin to your needs or use it as a source of inspiration.
Thanks for the tip - I’ll check it out and report back.
IMO it’s much better to fix unquoted attributes than a closing slashes. Just my 2 cents