class documentation
class Token: (source)
Known subclasses: mistletoe.block_token.BlockToken
, mistletoe.span_token.SpanToken
Base token class.
Token
has two subclasses:
block_token.BlockToken
, for all block level tokens. A block level token is text which occupies the entire horizontal width of the "page" and is offset for the surrounding sibling block with line breaks.span_token.SpanToken
, for all span-level (or inline-level) tokens. A span-level token appears inside the flow of the text lines without any surrounding line break.
Custom __repr__ methods in subclasses: The default __repr__ implementation outputs the number of child tokens (from the attribute children) if applicable, and the content attribute if applicable. If any additional attributes should be included in the __repr__ output, this can be specified by setting the class attribute repr_attributes to a tuple containing the attribute names to be output.
Method | __repr__ |
Undocumented |
Class Variable | repr |
Undocumented |
overridden in
mistletoe.contrib.scheme.Expr
, mistletoe.contrib.scheme.Number
, mistletoe.contrib.scheme.Variable
Undocumented
overridden in
mistletoe.block_token.BlockCode
, mistletoe.block_token.CodeFence
, mistletoe.block_token.Heading
, mistletoe.block_token.List
, mistletoe.block_token.ListItem
, mistletoe.block_token.SetextHeading
, mistletoe.block_token.Table
, mistletoe.block_token.TableCell
, mistletoe.block_token.TableRow
, mistletoe.span_token.AutoLink
, mistletoe.span_token.Image
, mistletoe.span_token.LineBreak
, mistletoe.span_token.Link
Undocumented