wdpr
    Preparing search index...
    • Creates a reusable close-condition function that matches block end tags ([[/name]]) for one or more block names.

      The returned function inspects the tokens at ctx.pos and returns both whether a match was found and how many tokens the closing tag occupies (including the optional trailing NEWLINE).

      Parameters

      • blockNames: string[]

        Array of block names to match (e.g. ["div"]).

      Returns (ctx: ParseContext) => { consumed: number; matched: boolean }

      A function suitable for use as a closeCondition argument, returning { matched, consumed }.