def stack.text

gralha-xml-doc@0.1.0.1 · xml.bend:250

import gralha-xml-doc@0.1.0.1/xml.bend as Xml
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U

250def stack.text(+s: List<&2, Element>, +text: String) -> List<&2, Element>:
251  U.branch(List<&2, Element>, U.string.equal(text, ""), _ => s,
252    _ => stack.add(s, Element{"#text", Nil{}, Nil{}, text}))

Uses (6)

Used by (1)