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

    Inline rule for parsing [[a]]...[[/a]] blocks.

    Triggered by a BLOCK_OPEN ([[) token. The rule verifies the block name is a or anchor (optionally with _ suffix), parses HTML attributes, then recursively parses inline content until the matching closing tag.

    Produces an "anchor" AST element containing the parsed children, a semantic target value, and the sanitized attribute map.

    Edge cases:

    • If no matching closing tag is found, the rule fails (returns { success: false }), allowing the tokens to fall through to other rules or the text fallback.
    • In paragraph strip mode, newlines within the body and after the closing tag are consumed silently rather than converted to line-break elements.
    • The href attribute is sanitized to block javascript:, data:, and vbscript: schemes.