Parse context positioned at the start of the body.
Predicate that signals the end of the block body.
Optionaloptions: { excludedBlockNames?: ReadonlySet<string> }Optional settings.
OptionalexcludedBlockNames?: ReadonlySet<string>Block names that should be excluded
from both rule dispatch and paragraph-boundary detection. The named
rules are filtered out of blockRules, and the set is propagated to
the inline parser via ParseContext.excludedBlockNames so that
BLOCK_OPEN / BLOCK_END_OPEN tokens for these names do not trigger
paragraph breaks.
Parsed elements and total tokens consumed.
Parses block-level elements from the token stream until a close condition is satisfied.
This is the workhorse parser used by container blocks (div, collapsible, tabview, iftags, align, etc.) to parse their body content. It loops through tokens, trying each block rule in priority order, and falls back to the paragraph rule when nothing else matches.
Whitespace and newline tokens between blocks are silently consumed. The close condition receives a ParseContext snapshot at the current position and should return
trueto stop parsing (the close tag itself is NOT consumed here -- the caller handles that).The close condition is also injected into
blockCloseConditionon the context so that the paragraph parser can respect the enclosing block's boundary.