def image.svg.root
gralha-svg-render@0.1.0.1 · svg.bend:3823
import gralha-svg-render@0.1.0.1/svg.bend as Svg
import Base
import gralha-text-scan@0.1.0.1/scan.bend as U
import gralha-xml-doc@0.1.0.1/xml.bend as XML
3823def image.svg.root(+xs: List<&2, XML.Element>) -> XML.Element:
3824 match xs:
3825 case Nil{}: XML.Element{"#empty", Nil{}, Nil{}, ""}
3826 case Con{XML.Element{n, as, kids, txt}, rest}:
3827 U.branch(XML.Element, U.string.equal(n, "svg"), _ => XML.Element{n, as, kids, txt}, _ => image.svg.root(rest))