markdown_it.parser_block module#

Block-level tokenizer.

class markdown_it.parser_block.ParserBlock[source]#

Bases: object

ParserBlock#ruler -> Ruler

[[Ruler]] instance. Keep configuration of block rules.

parse(src: str, md: MarkdownIt, env: EnvType, outTokens: list[Token]) list[Token] | None[source]#

Process input string and push block tokens into outTokens.

tokenize(state: StateBlock, startLine: int, endLine: int) None[source]#

Generate tokens for input range.


(state: StateBlock, startLine: int, endLine: int, silent: bool) -> matched: bool)

silent disables token generation, useful for lookahead.

alias of Callable[[StateBlock, int, int, bool], bool]