Kotlin / kotlinx.html

Kotlin DSL for HTML
Apache License 2.0
1.61k stars 131 forks source link

Option to remove empty attributes #232

Open martinstender opened 1 year ago

martinstender commented 1 year ago

Hi all,

Unless I have overlooked a configuration possibility, it would be really nice to globally get rid of empty attributes. And maybe trim the strings inside attributes as well, but that's minor. You could say that we could/should wrap everything in null/empty-checks, but it's of course a lot quicker to just add a class-variable to an element, without having to take into account, that some logic somewhere earlier have decided that there isn't a need for a specific css-class or something like that.

Any suggestions? TIA 😊