[xml] Improve XML tests, test core:encoding/entity.

This commit is contained in:
Jeroen van Rijn
2021-12-05 02:17:48 +01:00
parent 3d72e80ccf
commit d65d6edb0e
7 changed files with 291 additions and 176 deletions
+7
View File
@@ -115,7 +115,14 @@ decode_xml :: proc(input: string, options := XML_Decode_Options{}, allocator :=
We don't need to check if we need to write a `<`, because if it isn't CDATA or a comment,
it couldn't have been part of an XML tag body to be decoded here.
Keep in mind that we could already *be* inside a CDATA tag.
If so, write `>` as a literal and continue.
*/
if in_data {
write_rune(&builder, '<')
continue
}
in_data = _handle_xml_special(&t, &builder, options) or_return
case ']':