From bcf35336853a5dc934fb52608b18ea08c07b8991 Mon Sep 17 00:00:00 2001 From: Manfred Odenstein Date: Fri, 17 Jul 2020 13:16:21 +0200 Subject: [PATCH] removed white-space trimming of element content in the parser --- build.gradle.kts | 2 +- .../kotlin/com/solitec/aixm/updgen/PartialDocumentHandler.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 9c2a5bb..0c03d7c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,7 +4,7 @@ plugins { } group = "com.solitec.aixm" -version = "1.0.0" +version = "1.0.1" repositories { mavenCentral() diff --git a/src/main/kotlin/com/solitec/aixm/updgen/PartialDocumentHandler.kt b/src/main/kotlin/com/solitec/aixm/updgen/PartialDocumentHandler.kt index 8ab30fb..b830448 100644 --- a/src/main/kotlin/com/solitec/aixm/updgen/PartialDocumentHandler.kt +++ b/src/main/kotlin/com/solitec/aixm/updgen/PartialDocumentHandler.kt @@ -103,8 +103,8 @@ class PartialDocumentHandler(private val receiver: PartialHandler) : DefaultHand */ private fun finalizeElement() { val element = this.elementStack.pop() - val text = this.characters.toString().trim { it <= ' ' } - if (text.isNotEmpty()) { + val text = this.characters.toString() + if (text.trim { it <= ' ' }.isNotEmpty()) { element.textContent = text } }