From dc37ff50368f30742f422ea15d6373df67bcb13e Mon Sep 17 00:00:00 2001 From: StudebakerGuy <> Date: Wed, 7 Jan 2026 18:44:30 -0500 Subject: [PATCH] Comments before first emlement not being captured The xml library was not correctly detect that a comment occured before the first element. This addresses the issue, but the comment incorrectly includes --. --- core/encoding/xml/xml_reader.odin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/encoding/xml/xml_reader.odin b/core/encoding/xml/xml_reader.odin index 99d73670b..5e056177e 100644 --- a/core/encoding/xml/xml_reader.odin +++ b/core/encoding/xml/xml_reader.odin @@ -294,7 +294,7 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha comment := scan_comment(t) or_return if .Intern_Comments in opts.flags { - if len(doc.elements) == 0 { + if doc.element_count == 0 { append(&doc.comments, comment) } else { el := new_element(doc)