wikitext Package

wikitext Package

Functions for rendering any tiddler that has been identified as wikitext into the rendered form (usually HTML) of that wikitext.

Wikitext rendering is engaged when a tiddler is requested via a GET, when the negotiated media-type of the request is html, and when tiddler.type is either None or in the keys of the dictionary associated with the tiddlyweb.config['wikitext.type_render_map'].

When tiddler.type is None, the renderer named in tiddlyweb.config['wiktext.default_renderer'] is used. This is either a module in the tiddlyweb.wikitext package, or a module on sys.path.

When tiddler.type is something other than None, the renderer is determined by looking up the type in tiddlyweb.config['wikitext.type_render_map']. The found value is a module of the same type described above.

The renderer module has a function render.

tiddlyweb.wikitext.render_wikitext(tiddler=None, environ=None)

Take a tiddler and render wikitext in tiddler.text to some kind of HTML format.

raw Module

A default simple wikitext renderer which does not render the wikitext but instead wraps it in pre tags.

tiddlyweb.wikitext.raw.render(tiddler, environ)

Wrap HTML encoded wikitext with pre tags.