class documentation

HTML renderer class.

See mistletoe.base_renderer module for more info.

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 __init__ No summary
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_heading 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:

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 escape_html(raw: str) -> str: (source)

This method is deprecated. Use html.escape instead.

@staticmethod
def escape_url(raw: str) -> str: (source)

Escape urls to prevent code injection craziness. (Hopefully.)

@staticmethod
def render_html_block(token: block_token.HTMLBlock) -> str: (source)

Undocumented

@staticmethod
def render_html_span(token: span_token.HTMLSpan) -> str: (source)

Undocumented

def __exit__(self, *args): (source)

Make renderer classes into context managers.

Reset block_token._token_types and span_token._token_types.

def __init__(self, *extras): (source)
Parameters
*extras:listallows subclasses to add even more custom tokens.
def render_auto_link(self, token: span_token.AutoLink) -> str: (source)
def render_block_code(self, token: block_token.BlockCode) -> str: (source)
def render_emphasis(self, token: span_token.Emphasis) -> str: (source)
def render_image(self, token: span_token.Image) -> str: (source)
def render_inline_code(self, token: span_token.InlineCode) -> str: (source)
def render_link(self, token: span_token.Link) -> str: (source)
def render_list(self, token: block_token.List) -> str: (source)
def render_list_item(self, token: block_token.ListItem) -> str: (source)
def render_paragraph(self, token: block_token.Paragraph) -> str: (source)
def render_quote(self, token: block_token.Quote) -> str: (source)
def render_raw_text(self, token: span_token.RawText) -> str: (source)

Default render method for RawText. Simply return token.content.

def render_strong(self, token: span_token.Strong) -> str: (source)
def render_table(self, token: block_token.Table) -> str: (source)
def render_table_cell(self, token: block_token.TableCell, in_header=False) -> str: (source)
def render_table_row(self, token: block_token.TableRow, is_header=False) -> str: (source)
def render_to_plain(self, token) -> str: (source)

Undocumented

_suppress_ptag_stack: list[bool] = (source)

Undocumented