weasel API - v0.8.0
    Preparing search index...

    Function extractWeaselClipboardFromSvg

    • Recover an embedded weasel clipboard payload from SVG text: read the first <metadata> block, rejoin its CDATA sections (concatenation restores the ]]> split by embedWeaselMetadataInSvg; plain non-CDATA content passes through as-is), and return the payload text iff it sniffs as the weasel wire format — else null (external/non-weasel metadata declines).

      A text scan, not an XML parse — the payload is small and ours.

      Parameters

      • svgText: string

      Returns string | null