class documentation

class XWiki20Renderer(BaseRenderer): (source)

View In Hierarchy

XWiki syntax 2.0 renderer class.

See mistletoe.base_renderer module for more info.

Static Method render_line_break Undocumented
Static Method render_thematic_break Undocumented
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_html_block Undocumented
Method render_html_span Undocumented
Method render_image Undocumented
Method render_inline_code Undocumented
Method render_inner Recursively renders child tokens. Joins the rendered strings with no space in between.
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_x_wiki_block_macro_end Undocumented
Method render_x_wiki_block_macro_start Undocumented
Instance Variable firstChildOfListItems Undocumented
Instance Variable lastChildOfQuotes Undocumented
Instance Variable listTokens Undocumented
Method _block_eol Undocumented

Inherited from BaseRenderer:

Method __enter__ Make renderer classes into context managers.
Method __exit__ Make renderer classes into context managers.
Method render Grabs the class name from input token and finds its corresponding render function.
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.
def __init__(self, *extras): (source)
Parameters
*extras:listallows subclasses to add even more custom tokens.
def render_auto_link(self, token): (source)
def render_block_code(self, token): (source)
def render_document(self, token): (source)
def render_emphasis(self, token): (source)
def render_escape_sequence(self, token): (source)
def render_heading(self, token): (source)
def render_html_block(self, token): (source)

Undocumented

def render_html_span(self, token): (source)

Undocumented

def render_image(self, token): (source)
def render_inline_code(self, token): (source)
def render_inner(self, token): (source)

Recursively renders child tokens. Joins the rendered strings with no space in between.

If newlines / spaces are needed between tokens, add them in their respective templates, or override this function in the renderer subclass, so that whitespace won't seem to appear magically for anyone reading your program.

Parameters
tokena branch node who has children attribute.
def render_link(self, token): (source)
def render_list(self, token): (source)
def render_list_item(self, token): (source)
def render_paragraph(self, token): (source)
def render_quote(self, token): (source)
def render_raw_text(self, token, escape=True): (source)

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

def render_strikethrough(self, token): (source)
def render_strong(self, token): (source)
def render_table(self, token): (source)
def render_table_cell(self, token, in_header=False): (source)
def render_table_row(self, token, is_header=False): (source)
def render_x_wiki_block_macro_end(self, token): (source)

Undocumented

def render_x_wiki_block_macro_start(self, token): (source)

Undocumented

firstChildOfListItems: list = (source)

Undocumented

lastChildOfQuotes: list = (source)

Undocumented

listTokens: list = (source)

Undocumented

def _block_eol(self, token): (source)

Undocumented