quick-xml icon indicating copy to clipboard operation
quick-xml copied to clipboard

Writer : add a space before "/>" of empty emements : as W3C guideline

Open rubik83 opened this issue 10 months ago • 1 comments

In the W3C guideline (C.2): https://www.w3.org/TR/xhtml1/#guidelines Empty elements should be ended with " />" instead of "/>" A space should be added at line: https://github.com/tafia/quick-xml/blob/master/src/writer/async_tokio.rs#L28

rubik83 avatar Feb 25 '25 10:02 rubik83

I'm open for a PR which will add an option to Writer to do that. It should be documented and tested (doctest will be enough). Because currently Writer does not have options struct like a Reader, the preferred way is to add it.

Mingun avatar Feb 25 '25 18:02 Mingun