Fix: #21541. Add support for xnVerbatimText (#21542)

to text and text= procs. Remove unnecessary LF for xnVerbatimText
in $ proc.
This commit is contained in:
Mark Leyva
2023-03-20 10:50:58 -07:00
committed by GitHub
parent fb00b482eb
commit 285ea3c48e
2 changed files with 19 additions and 4 deletions

View File

@@ -99,3 +99,18 @@ block: # bug #21290
doAssert s == """<foo>
<bar>Hola<qux> <plugh /> </qux></bar>
</foo>"""
block: #21541
let root = <>root()
root.add <>child(newText("hello"))
root.add <>more(newVerbatimText("hola"))
let s = $root
doAssert s == """<root>
<child>hello</child>
<more>hola</more>
</root>"""
let temp = newVerbatimText("Hello!")
doAssert temp.text == "Hello!"
temp.text = "Hola!"
doAssert temp.text == "Hola!"