@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;
    }
    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.