@wdprlib/parser
    Preparing search index...

    Variable anchorRuleConst

    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 are consumed silently rather than converted to line-break elements. After the closing tag, at most one trailing newline is consumed to prevent a line-break between consecutive [[a_]] blocks, but double newlines are preserved as paragraph breaks.
    • The href attribute is sanitized to block javascript:, data:, and vbscript: schemes.