crossnote
    Preparing search index...

    Function extractBlockIds

    • Find every ^id block marker in text and return { id, body } pairs in source order. body is the line content with the trailing ^id stripped (handy for previews). Duplicate IDs (the user accidentally writing the same ^id twice) are de-duplicated; only the first occurrence is kept.

      Marker shape: ^[a-zA-Z0-9_-]+ at end of line. Same form crossnote's transformer produces for ^id source markers, and the form the host should write when generating new IDs.

      Parameters

      • text: string

      Returns { body: string; id: string }[]