redundent / kotlin-xml-builder

A lightweight type safe builder to build xml documents in Kotlin
Apache License 2.0
155 stars 19 forks source link

Space before Text node #69

Closed sullrich84 closed 1 month ago

sullrich84 commented 1 month ago

I'm not sure if it's a bug or misconfiguration but there are spaces before text elements:

"status" {
    text("HTTP/1.1 200 OK")
}

would serilize to

<status> HTTP/1.1 200 OK</status> 

The only workaround I found is to use:

unsafeText("<href>HTTP/1.1 200 OK</href>")
sullrich84 commented 1 month ago

Disabling the prettyPrint option solved this issue.