Contents:
Installs a render function for the specified tag name. The render function should have the following signature:
def render(tag_name, value, options, parent, context)
The arguments are as follows:
- tag_name
- The name of the tag being rendered.
- value
- The context between start and end tags, or None for standalone tags. Whether this has been rendered depends on render_embedded tag option.
- options
- A dictionary of options specified on the opening tag.
- parent
- The parent TagOptions, if the tag is being rendered inside another tag, otherwise None.
- context
- The keyword argument dictionary passed into the format call.
Installs a formatter that takes the tag options dictionary, puts a value key in it, and uses it as a format dictionary to the given format string.
Formats the input text using any installed renderers. Any context keyword arguments given here will be passed along to the render functions as a context dictionary.
Installs default formatters for the following tags:
b, i, u, s, list (and *), quote, code, center, color, url
Strips out any tags from the input text, using the same tokenization as the formatter.
Tokenizes the given string. A token is a 4-tuple of the form:
(token_type, tag_name, tag_options, token_text)
True if HTML characters (<, >, and &) should be escaped inside this tag.
True if a newline should automatically close this tag.
True if tags should be rendered inside this tag.
True if cosmetic replacements (elipses, dashes, etc.) should be performed inside this tag.
True if URLs should be replaced with link markup inside this tag.
True if this tag does not have a closing tag.
True if leading and trailing whitespace should be stripped inside this tag.
True if this tag should swallow the first trailing newline (i.e. for block elements).
The name of the tag, all lowercase.
True if newlines should be converted to markup.
A module-level convenience method that creates a default bbcode parser, and renders the input string as HTML.