class documentation

Extends HTMLRenderer class for table of contents support.

Parameters
depththe maximum level of heading to be included in TOC;
omit_titlewhether to ignore tokens where token.level == 1;
filter_condswhen any of these functions evaluate to true, current heading will not be included;
*extrasallows subclasses to add even more custom tokens.
Static Method parse_rendered_heading Helper method; converts rendered heading to plain text.
Method __init__ No summary
Method render_heading Overrides super().render_heading; stores rendered heading first, then returns it.
Instance Variable depth Undocumented
Instance Variable filter_conds Undocumented
Instance Variable omit_title Undocumented
Property toc Returns table of contents as a block_token.List instance.
Instance Variable _headings Undocumented

Inherited from HTMLRenderer:

Static Method escape_html This method is deprecated. Use html.escape instead.
Static Method escape_url Escape urls to prevent code injection craziness. (Hopefully.)
Static Method render_html_block Undocumented
Static Method render_html_span Undocumented
Static Method render_line_break Undocumented
Static Method render_thematic_break Undocumented
Method __exit__ Make renderer classes into context managers.
Method render_auto_link Undocumented
Method render_block_code Undocumented
Method render_document Undocumented
Method render_emphasis Undocumented
Method render_escape_sequence Undocumented
Method render_image Undocumented
Method render_inline_code Undocumented
Method render_link Undocumented
Method render_list Undocumented
Method render_list_item Undocumented
Method render_paragraph Undocumented
Method render_quote Undocumented
Method render_raw_text Default render method for RawText. Simply return token.content.
Method render_strikethrough Undocumented
Method render_strong Undocumented
Method render_table Undocumented
Method render_table_cell Undocumented
Method render_table_row Undocumented
Method render_to_plain Undocumented
Instance Variable _suppress_ptag_stack Undocumented

Inherited from BaseRenderer (via HTMLRenderer):

Method __enter__ Make renderer classes into context managers.
Method render Grabs the class name from input token and finds its corresponding render function.
Method render_inner Recursively renders child tokens. Joins the rendered strings with no space in between.
Instance Variable footnotes Undocumented
Instance Variable render_map maps tokens to their corresponding render functions.
Class Method _cls_to_func Undocumented
Static Method _tokens_from_module Helper method; takes a module and returns a list of all token classes specified in module.__all__. Useful when custom tokens are defined in a separate module.
Class Variable _parse_name Undocumented
Instance Variable _extras a list of custom tokens to be added to the parsing process.
@staticmethod
def parse_rendered_heading(rendered): (source)

Helper method; converts rendered heading to plain text.

def __init__(self, depth=5, omit_title=True, filter_conds=[], *extras): (source)
Parameters
depthUndocumented
omit_titleUndocumented
filter_condsUndocumented
*extras:listallows subclasses to add even more custom tokens.
def render_heading(self, token): (source)

Overrides super().render_heading; stores rendered heading first, then returns it.

Undocumented

filter_conds: list = (source)

Undocumented

omit_title: bool = (source)

Undocumented

Returns table of contents as a block_token.List instance.

_headings: list = (source)

Undocumented