Skip to content

Commit 6c74f8c

Browse files
committed
XmlReader: trim chars to avoid a single word with whitescape to be seen as two
1 parent 4e5a50f commit 6c74f8c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • server/src/main/kotlin/org/ivdnt/galahad/formats/xml

server/src/main/kotlin/org/ivdnt/galahad/formats/xml/XmlReader.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ abstract class XmlReader(stream: InputStream) : LayerReader() {
170170
}
171171

172172
private fun parseChars() {
173-
val words = reader.text.ifBlank { null }?.split(whitespace) ?: emptyList()
173+
val words = reader.text.ifBlank { null }?.trim()?.split(whitespace) ?: emptyList()
174174
for ((j, word) in words.withIndex()) {
175175
if (j > 0) newWordform()
176176
literal += word

0 commit comments

Comments
 (0)