Class | BlockCode |
Indented code. |
Class | BlockToken |
Base class for block-level tokens. Recursively parse inner tokens. |
Class | CodeFence |
Code fence. (["`sh\n", "rm -rf /", ..., "`"]) Boundary between span-level and block-level tokens. |
Class | Document |
Document token. |
Class | Footnote |
Footnote token. A "link reference definition" according to the spec. |
Class | Heading |
Heading token. (["### some heading ###n"]) Boundary between span-level and block-level tokens. |
Class | HTMLBlock |
Block-level HTML tokens. |
Class | List |
List token. |
Class | ListItem |
List items. Not included in the parsing process, but called by List. |
Class | Paragraph |
Paragraph token. (["somen", "continuousn", "linesn"]) Boundary between span-level and block-level tokens. |
Class | Quote |
Quote token. (["> # headingn", "> paragraphn"]) |
Class | SetextHeading |
Setext headings. |
Class | Table |
Table token. |
Class | TableCell |
Table cell token. Boundary between span-level and block-level tokens. |
Class | TableRow |
Table row token. Supports escaped pipes in table cells (for primary use within code spans). |
Class | ThematicBreak |
Thematic break token (a.k.a. horizontal rule.) |
Function | add_token |
Allows external manipulation of the parsing process. This function is usually called in BaseRenderer.__enter__. |
Function | remove_token |
Allows external manipulation of the parsing process. This function is usually called in BaseRenderer.__exit__. |
Function | reset_tokens |
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 | _root_node |
Undocumented |
Variable | _token_types |
Undocumented |
Parameters | |
token_cls:SpanToken | token to be included in the parsing process. |
position:int | the position for the token class to be inserted into. |
Parameters | |
token_cls:BlockToken | 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.