cliriculum.renderers

class cliriculum.renderers.MainRenderer
Parameters:
  • extras (list) – allows subclasses to add even more custom tokens.

  • html_escape_double_quotes (bool) – whether to also escape double quotes when HTML-escaping rendered text.

  • html_escape_single_quotes (bool) – whether to also escape single quotes when HTML-escaping rendered text.

  • process_html_tokens (bool) – whether to include HTML tokens in the processing. If False, HTML markup will be treated as plain text: e.g. input <br> will be rendered as &lt;br&gt;.

  • **kwargs – additional parameters to be passed to the ancestor’s constructor.

render_document(token)

Renders document to html representation in <main>…</main> tags

Parameters:

token

Returns:

An HTML snippet using template MainRenderer.html_template

Return type:

str

class cliriculum.renderers.SideBarRenderer
html_template
Type:

str

Parameters:
  • extras (list) – allows subclasses to add even more custom tokens.

  • html_escape_double_quotes (bool) – whether to also escape double quotes when HTML-escaping rendered text.

  • html_escape_single_quotes (bool) – whether to also escape single quotes when HTML-escaping rendered text.

  • process_html_tokens (bool) – whether to include HTML tokens in the processing. If False, HTML markup will be treated as plain text: e.g. input <br> will be rendered as &lt;br&gt;.

  • **kwargs – additional parameters to be passed to the ancestor’s constructor.

render_document(token) str

Renders document to html representation in <aside>…</aside> tags

Parameters:

token – A node

Returns:

An HTML snippet using template SideBarRenderer.html_template

Return type:

str