mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
encoding.xml: fix parsing for self closing empty tags (#19907)
This commit is contained in:
parent
66181f05bd
commit
1482a2f28d
2 changed files with 6 additions and 1 deletions
|
@ -562,7 +562,7 @@ pub fn parse_single_node(first_char u8, mut reader io.Reader) !XMLNode {
|
|||
tag_contents := contents.str().trim_space()
|
||||
|
||||
parts := tag_contents.split_any(' \t\n')
|
||||
name := parts[0]
|
||||
name := parts[0].trim_right('/')
|
||||
|
||||
// Check if it is a self-closing tag
|
||||
if tag_contents.ends_with('/') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue