@wdprlib/parser
    Preparing search index...

    Per-scope state propagated by spread + override semantics.

    Every field is readonly so a rule cannot accidentally mutate the parent scope by writing through a shared reference. Updates must be expressed as a replacement: ctx.scope = { ...ctx.scope, X: ... }.

    interface ScopeContext {
        blockCloseCondition?: (ctx: ParseContext) => boolean;
        divClosesBudget?: number;
        excludedBlockNames?: ReadonlySet<string>;
        footnoteBlockParsed: boolean;
        inlineEnd?: number;
        suppressEmailLinks?: boolean;
        tableFormatting?: { end: number; suppressedClosers: Set<number> };
    }
    Index

    Properties

    blockCloseCondition?: (ctx: ParseContext) => boolean

    Close condition for the current block. The paragraph parser calls it to decide when to stop collecting inline content.

    divClosesBudget?: number

    Budget for div nesting: tracks how many more nested divs can open.

    excludedBlockNames?: ReadonlySet<string>

    Block names excluded from paragraph-boundary detection.

    footnoteBlockParsed: boolean

    Used by the footnote-block rule to reject duplicate top-level occurrences.

    Scope is per spread copy of ParseContext, not document-global. This keeps the original primitive semantics while avoiding rollback-unsafe shared state.

    inlineEnd?: number

    Exclusive token boundary inherited by nested inline rules.

    suppressEmailLinks?: boolean

    Keep bare addresses as text inside an existing anchor.

    tableFormatting?: { end: number; suppressedClosers: Set<number> }

    Closing delimiters paired across cells of the current pipe table.