diff options
| author | StudebakerGuy <> | 2026-01-07 18:44:30 -0500 |
|---|---|---|
| committer | StudebakerGuy <> | 2026-01-07 19:28:44 -0500 |
| commit | dc37ff50368f30742f422ea15d6373df67bcb13e (patch) | |
| tree | 48d518047ec8c4388db72edba9bc70e018720d6d | |
| parent | f9d9166ff11f3b6eeedb4355dfa930d69c40be8a (diff) | |
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 --.
| -rw-r--r-- | core/encoding/xml/xml_reader.odin | 2 |
1 files changed, 1 insertions, 1 deletions
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) |