class documentation

class HTMLRenderer(BaseRenderer):

View In Hierarchy

HTML renderer class.

See mistletoe.base_renderer module for more info.

Static Method escape​_html Undocumented
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__ Args: extras (list): allows subclasses to add even more custom tokens.
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 ​_stdlib​_charref Undocumented
Instance Variable ​_suppress​_ptag​_stack Undocumented

Inherited from BaseRenderer:

Method __enter__ Make renderer classes into context managers.
Method __getattr__ Provides a default render method for all tokens.
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):

Undocumented

@staticmethod
def escape_url(raw):
Escape urls to prevent code injection craziness. (Hopefully.)
@staticmethod
def render_html_block(token):

Undocumented

@staticmethod
def render_html_span(token):

Undocumented

@staticmethod
def render_line_break(token):

Undocumented

@staticmethod
def render_thematic_break(token):

Undocumented

def __exit__(self, *args):

Make renderer classes into context managers.

Reset block_token._token_types and span_token._token_types.

def __init__(self, *extras):
Parameters
*extras:listallows subclasses to add even more custom tokens.
def render_auto_link(self, token):

Undocumented

def render_block_code(self, token):

Undocumented

def render_document(self, token):

Undocumented

def render_emphasis(self, token):

Undocumented

def render_escape_sequence(self, token):

Undocumented

def render_heading(self, token):

Undocumented

def render_image(self, token):

Undocumented

def render_inline_code(self, token):

Undocumented

def render_link(self, token):

Undocumented

def render_list(self, token):

Undocumented

def render_list_item(self, token):

Undocumented

def render_paragraph(self, token):

Undocumented

def render_quote(self, token):

Undocumented

def render_raw_text(self, token):
Default render method for RawText. Simply return token.content.
def render_strikethrough(self, token):

Undocumented

def render_strong(self, token):

Undocumented

def render_table(self, token):

Undocumented

def render_table_cell(self, token, in_header=False):

Undocumented

def render_table_row(self, token, is_header=False):

Undocumented

def render_to_plain(self, token):

Undocumented

_stdlib_charref =

Undocumented

_suppress_ptag_stack: list[bool] =

Undocumented