module documentation
Built-in block-level token classes.
Class |
|
Indented code block token. This is a leaf block token with a single child of type span_token.RawText. |
Class |
|
Base class for block-level tokens. Recursively parse inner tokens. |
Class |
|
Fenced code block token. (["`sh\n", "rm -rf /", ..., "`"]) This is a leaf block token with a single child of type span_token.RawText. |
Class |
|
Document token. This is a container block token. Its children are block tokens - container or leaf ones. |
Class |
|
Footnote token. A "link reference definition" according to the spec. This is a leaf block token. Its children are inline (span) tokens. |
Class |
|
ATX heading token. (["### some heading ###n"]) This is a leaf block token. Its children are inline (span) tokens. |
Class |
|
Block-level HTML token. This is a leaf block token without children. |
Class |
|
List token. This is a container block token. Its children are list item tokens. |
Class |
|
List item token. This is a container block token. Its children are block tokens - container or leaf ones. |
Class |
|
Paragraph token. (["somen", "continuousn", "linesn"]) This is a leaf block token. Its children are inline (span) tokens. |
Class |
|
Block quote token. (["> # headingn", "> paragraphn"]) This is a container block token. Its children are block tokens - container or leaf ones. |
Class |
|
Setext heading token. This is a leaf block token. Its children are inline (span) tokens. |
Class |
|
Table token. This is a container block token. Its children are table row tokens. |
Class |
|
Table cell token. This is a leaf block token. Its children are inline (span) tokens. |
Class |
|
Table row token. Supports escaped pipes in table cells (for primary use within code spans). This is a container block token. Its children are table cell tokens. |
Class |
|
Thematic break token (a.k.a. horizontal rule.) This is a leaf block token without children. |
Function | add |
Allows external manipulation of the parsing process. This function is usually called in BaseRenderer.__enter__. |
Function | remove |
Allows external manipulation of the parsing process. This function is usually called in BaseRenderer.__exit__. |
Function | reset |
Resets global _token_types to all token classes in __all__. |
Function | tokenize |
A wrapper around block_tokenizer.tokenize. Pass in all block-level token constructors as arguments to block_tokenizer.tokenize. |
Variable | _token |
Undocumented |
Allows external manipulation of the parsing process. This function is usually called in BaseRenderer.__exit__.
Parameters | |
tokenBlockToken | token to be removed from the parsing process. |
A wrapper around block_tokenizer.tokenize. Pass in all block-level token constructors as arguments to block_tokenizer.tokenize.
Doing so (instead of importing block_token module in block_tokenizer) avoids cyclic dependency issues, and allows for future injections of custom token classes.
_token_types variable is at the bottom of this module.
See also: block_tokenizer.tokenize, span_token.tokenize_inner.