crossnote
    Preparing search index...

    Function findFragmentTargetLine

    • Resolve a wikilink-style URL fragment to a 0-based line number in the given markdown source. Tries, in order:

      1. ^block-id reference — matched against the LAST ^id in the fragment, so combined Heading^id fragments still resolve to the block (block IDs are unique per file, so we ignore the heading prefix).
      2. Explicit {#custom-id} block-attribute span on a heading — mirrors what the curly-bracket-attributes plugin does at render time (# Foo {#bar} emits <h1 id="bar">), so a wikilink to #bar resolves to that heading line.
      3. Auto-generated heading slug — produced with HeadingIdGenerator so anchors like #Setup line up with how crossnote renders headings without explicit IDs.

      Returns -1 if no match.

      Parameters

      • text: string
      • fragment: string

      Returns number