def pattern.merge

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

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

2954def pattern.merge(local: XML.Element, template: XML.Element) -> XML.Element:
2955  XML.Element{n, as, kids, txt} = local
2956  XML.Element{tn, tas, tkids, ttxt} = template
2957  +children = kids
2958  XML.Element{n, XML.attrs.append(as, pattern.attributes(tas)), U.choose(List<&2, XML.Element>, pattern.has.content(children), children, tkids), txt}

Uses (6)

Used by (1)