module documentation
Built-in span-level token classes.
Class |
|
Autolink token. ("<http://www.google.com>") This is an inline token with a single child of type RawText. |
Class |
|
Represents core tokens (Strong, Emphasis, Image, Link) during the early stage of parsing. Replaced with objects of the proper classes in the final stage of parsing. |
Class |
|
Emphasis token. ("some text") This is an inline token. Its children are inline (span) tokens. One of the core tokens. |
Class |
|
Escape sequence token. ("*") This is an inline token with a single child of type RawText. |
Class |
|
Span-level HTML token. This is an inline token without children. |
Class |
|
Image token. ("![alt](src "title")") This is an inline token. Its children are inline (span) tokens holding the image description. One of the core tokens. |
Class |
|
Inline code token. ("some code ") This is an inline token with a single child of type RawText. |
Class |
|
Line break token. Hard or soft. This is an inline token without children. |
Class |
|
Link token. ("[name](target)") This is an inline token. Its children are inline (span) tokens holding the link text. One of the core tokens. |
Class |
|
Raw text token. This is an inline token without children. |
Class |
|
Undocumented |
Class |
|
Strikethrough token. ("~~some text~~") This is an inline token. Its children are inline (span) tokens. |
Class |
|
Strong token. ("some text") This is an inline token. Its children are inline (span) tokens. One of the core tokens. |
Class |
|
A "block" macro closing tag. ("<onlySpacesAllowed>{{/macroName}}") |
Class |
|
A "block" macro opening tag. ("{{macroName<optionalParams>}}<newLine>") |
Function | add |
Allows external manipulation of the parsing process. This function is called in BaseRenderer.__enter__. |
Function | remove |
Allows external manipulation of the parsing process. This function is called in BaseRenderer.__exit__. |
Function | reset |
Resets global _token_types to all token classes in __all__. |
Function | tokenize |
A wrapper around span_tokenizer.tokenize. Pass in all span-level token constructors as arguments to span_tokenizer.tokenize. |
Variable | _attrs |
Undocumented |
Variable | _cdata |
Undocumented |
Variable | _closing |
Undocumented |
Variable | _comment |
Undocumented |
Variable | _declaration |
Undocumented |
Variable | _instruction |
Undocumented |
Variable | _open |
Undocumented |
Variable | _tag |
Undocumented |
Variable | _tags |
Undocumented |
Variable | _token |
Undocumented |
Allows external manipulation of the parsing process. This function is called in BaseRenderer.__enter__.
Parameters | |
tokenSpanToken | token to be included in the parsing process. |
position | Undocumented |
Allows external manipulation of the parsing process. This function is called in BaseRenderer.__exit__.
Parameters | |
tokenSpanToken | token to be removed from the parsing process. |
A wrapper around span_tokenizer.tokenize. Pass in all span-level token constructors as arguments to span_tokenizer.tokenize.
Doing so (instead of importing span_token module in span_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: span_tokenizer.tokenize, block_token.tokenize.