Skip to content

Function: parseMarkers()

parseMarkers(text): ParsedMarker[]

Parse every embed marker out of text, in source order. A single regex pass means matches never overlap, so callers can splice the spans directly without a sort/dedupe step. This is the one entry point for marker parsing: type branching runs on the returned markers. The grammar (MARKER_RE) matches any non-bracket id token, so a returned ParsedMarker.id is NOT guaranteed to be a real embed id - run it through isUuid to tell a genuine embed apart from a fabricated label, which the caller then obscures rather than rendering.

string

ParsedMarker[]