mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-18 20:40:28 +00:00
Address issue identifying of CDATA
The XML library wasn't identifying CDATA and skipping over it. This was found when CDATA contained a <. This patch addresses that issue.
This commit is contained in:
@@ -308,6 +308,7 @@ parse_bytes :: proc(data: []u8, options := DEFAULT_OPTIONS, path := "", error_ha
|
||||
case .Open_Bracket:
|
||||
// This could be a CDATA tag part of a tag's body. Unread the `<![`
|
||||
t.offset -= 3
|
||||
t.read_offset = t.offset
|
||||
|
||||
// Instead of calling `parse_body` here, we could also `continue loop`
|
||||
// and fall through to the `case:` at the bottom of the outer loop.
|
||||
@@ -625,4 +626,4 @@ new_element :: proc(doc: ^Document) -> (id: Element_ID) {
|
||||
cur := doc.element_count
|
||||
doc.element_count += 1
|
||||
return cur
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user