def image.svg.read

gralha-svg-render@0.1.0.1 · svg.bend:3773

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

3773def image.svg.read(+text: String) -> XML.Element:
3774  +source = U.choose(String, U.prefix(text, ""), U.drop(text, ""), text)
3775  U.branch(XML.Element, image.svg.wellformed(XML.tokenize(source), Nil{}, False{}), _ => XML.parse(source), _ => XML.Element{"#document", Nil{}, Nil{}, ""})

Uses (11)

Used by (1)