wdpr
    Preparing search index...
    linkTripleRule: InlineRule = ...

    Inline rule for parsing [[[target | label]]] triple-bracket links.

    Triggered by a LINK_OPEN ([[[) token. Collects the target string and optional pipe-separated label, then determines the link type (page, anchor, direct URL, or interwiki) based on the target format.

    When no valid closing ]]] is found, the opening [[[ is emitted as literal text.

    Edge cases handled:

    • Empty target with pipe ([[[|text]]]) is invalid
    • Multiple consecutive # in the target ([[[page##anchor]]]) is invalid
    • [[[*|label]]] links to root /
    • [[[*page]]] strips the * prefix from the target
    • Category pages show only the text after the colon when no label is given