Svg.image.svg.source: def of gralha-svg-render@0.1.0.1 Import: import gralha-svg-render@0.1.0.1/svg.bend as Svg Lines 3818-3821 of gralha-svg-render@0.1.0.1/svg.bend: https://jend.leeeet.dev/read.txt?path=gralha-svg-render@0.1.0.1/svg.bend&start_line=3818&end_line=3821 import Base import gralha-text-scan@0.1.0.1/scan.bend as U import gralha-css-style@0.1.0.1/css.bend as CSS import gralha-bytes@0.1.0.1/bytes.bend as Bin def image.svg.source(+scan: U.Scan) -> String: U.Scan{mime, data} = scan +body = U.branch(Bin.Bytes, U.string.contains(CSS.css.lower(mime), ";base64"), _ => Bin.base64(data), _ => image.svg.uri.bytes(data, Bin.bytes.empty())) image.svg.byte.text(body, 0, "") Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=Bytes https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=base64 https://jend.leeeet.dev/definition.txt?path=gralha-bytes@0.1.0.1/bytes.bend&name=bytes.empty https://jend.leeeet.dev/definition.txt?path=gralha-css-style@0.1.0.1/css.bend&name=css.lower https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=image.svg.byte.text https://jend.leeeet.dev/definition.txt?path=gralha-svg-render@0.1.0.1/svg.bend&name=image.svg.uri.bytes https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=Scan https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=branch https://jend.leeeet.dev/definition.txt?path=gralha-text-scan@0.1.0.1/scan.bend&name=string.contains