Markup Nodes

inyoka.markup.nodes

The nodes for the parse tree of the parser.

Nodes also provide the formatting methods to generate HTML or whatever. If you want to add new formatting methods don’t forget to register it in the dispatching functions. Also in the other modules and especially in macro and parser baseclasses.

All nodes except of the base nodes have to have a __dict__. This is enforced because dict-less objects cannot be replaced in place which is a required by the DeferredNode.

copyright:
  1. 2007-2024 by the Inyoka Team, see AUTHORS for more details.

license:

BSD, see LICENSE for more details.

class inyoka.markup.nodes.BaseNode

internal Baseclass for all nodes. Usually you inherit from Node that implements the renderer and compiler interface but sometimes it can be useful to have a plain node.

allowed_in_signatures = False

allowed in signatures?

allows_paragraphs = False

this is true of this element can contain paragraphs.

is_block_tag = False

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

is_container = False

if this node contains child nodes (has a children attribute) this is true. Also containers are usually subclasses of the Container node but that’s not a requirement.

is_document = False

if the current node is a document node (outermost one) this is true. So far there is only one node which is called “document”, in the future a node “Page” could be added that has layout information for printing.

is_linebreak_node = False

whether the node is just for creating line breaks

is_paragraph = False

this is true if the element is a paragraph node

is_raw = False

This is true of the node contains raw data. Raw data is data that is never processed by a transformer. For example if you don’t want to have typographical quotes this is the flag to alter. Use this only if the contents of that node matter (sourcecode etc.)

is_text_node = False

True if this is a text node

text = ''

the value of the node as text

class inyoka.markup.nodes.Big(children=None, id=None, style=None, class_=None)

The opposite of Small, but it doesn’t give the element a real emphasis.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Box(title=None, children=None, align=None, valign=None, id=None, style=None, class_=None)

A dialog like object. Usually renders to a layer with one headline and a second layer for the contents.

allows_paragraphs = True

this is true of this element can contain paragraphs.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Code(children=None, id=None, style=None, class_=None)

This represents code. Usually formatted in a monospaced font that preserves whitespace. Additionally, this node is marked raw, so children are not touched by the altering translators.

allowed_in_signatures = True

allowed in signatures?

is_raw = True

This is true of the node contains raw data. Raw data is data that is never processed by a transformer. For example if you don’t want to have typographical quotes this is the flag to alter. Use this only if the contents of that node matter (sourcecode etc.)

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Color(value, children=None, id=None, style=None, class_=None)

Gives the embedded text a color. Like Underline it just exists because of backwards compatibility (this time to phpBB).

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.ConflictMarker(type)

Represents a conflict marker in the markup. The type argument must be one of left, middle, or right.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Container(children=None)

A basic node with children.

get_fragment_nodes(inline_paragraph=False)

This function returns a tuple in the form (children, is_block). If the container holds exactly one unstyled paragraph the elements in that paragraph are used if inline_paragraph is set to True.

The is_block item in the tuple is True if the children returned required a block tag as container.

property is_block_tag

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

is_container = True

if this node contains child nodes (has a children attribute) this is true. Also containers are usually subclasses of the Container node but that’s not a requirement.

is_plain = True

this is true if the container is plain (unstyled)

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

property text

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

class inyoka.markup.nodes.DeferredNode(node)

Special node with a become() function that can be used to replace this node in place with another one.

become(other)
property is_block_tag

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

class inyoka.markup.nodes.DefinitionList(children=None, id=None, style=None, class_=None)

A list of definition terms.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.DefinitionTerm(term, children=None, id=None, style=None, class_=None)

A definition term has a term (surprise) and a value (the children).

allows_paragraphs = True

this is true of this element can contain paragraphs.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Document(children=None)

Outermost node.

allowed_in_signatures = True

allowed in signatures?

allows_paragraphs = True

this is true of this element can contain paragraphs.

is_document = True

if the current node is a document node (outermost one) this is true. So far there is only one node which is called “document”, in the future a node “Page” could be added that has layout information for printing.

class inyoka.markup.nodes.Edited(username, children=None, id=None, style=None, class_=None)

Text that describes an edit action.

allowed_in_signatures = False

allowed in signatures?

allows_paragraphs = True

this is true of this element can contain paragraphs.

css_class = 'edited'

CSS Class used for styling

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

msg = 'Edited by'

Title message for the edited box

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Element(children=None, id=None, style=None, class_=None)

Baseclass for elements.

property is_plain

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

property text

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

class inyoka.markup.nodes.Emphasized(children=None, id=None, style=None, class_=None)

Like Strong, but with slightly less importance. Usually rendered with an italic font face.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Error(children=None, id=None, style=None, class_=None)

If a macro is not renderable or not found this is shown instead.

allows_paragraphs = True

this is true of this element can contain paragraphs.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Font(face=None, children=None, id=None, style=None, class_=None)

Gives the embedded text a font face. Like Underline it just exists because of backwards compatibility.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Footnote(children=None, id=None, style=None, class_=None)

This represents a footnote. A transformer moves the actual text down to the bottom and sets an automatically incremented id. If that transformer is not activated a <small> section is rendered.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.HTML(html='', block_level=True)

Raw HTML snippet.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

property text

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

class inyoka.markup.nodes.HTMLOnly(html, fallback, block_level=True)

Like HTML but with a fallback for non HTML formats.

class inyoka.markup.nodes.Headline(level, children=None, id=None, style=None, class_=None)

Represents all kinds of headline tags.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Highlighted(children=None, id=None, style=None, class_=None)

Marks highlighted text.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Image(href, alt, id=None, class_=None, style=None, title=None)

Holds a reference to an image. Because images are quite problematic for alternative output formats it’s supported to replace it with the alt tag on rendering. So far images targets are always absolute urls.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

Link to user pages, attachments or external sites.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

Resolve an interwiki link. If the token does not exist, the return value will be None.

Page to page links.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Layer(children=None, id=None, style=None, class_=None)

Like a box but without headline and an nested content section. Translates into a plain old HTML div or something comparable.

allows_paragraphs = True

this is true of this element can contain paragraphs.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

External or anchor links.

allowed_in_signatures = True

allowed in signatures?

property href
prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.List(type, children=None, id=None, style=None, class_=None)

Surrounds list items so that they appear as list. Make sure that the children are list items.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.ListItem(children=None, id=None, style=None, class_=None)

Marks the children as list item. Use in conjunction with list.

allows_paragraphs = True

this is true of this element can contain paragraphs.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Macro(macro)

Reference to a runtime macro.

property is_block_tag

bool(x) -> bool

Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.MetaData(key, values)

Holds invisible metadata. Never rendered.

allowed_in_signatures = True

allowed in signatures?

is_block_tag = False

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

class inyoka.markup.nodes.Moderated(username, children=None, id=None, style=None, class_=None)

Text that describes a moderation action.

css_class = 'moderated'

CSS Class used for styling

msg = 'Moderated by'

Title message for the edited box

class inyoka.markup.nodes.Newline

A newline in a paragraph. Never use multiple of those.

allowed_in_signatures = True

allowed in signatures?

is_linebreak_node = True

whether the node is just for creating line breaks

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

property text

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

class inyoka.markup.nodes.Node

The public baseclass for all nodes. It implements the NodeRenderer and NodeCompiler and sets some basic attributes every node must have.

prepare(format)

Public interface to the rendering functions. This is only a dispatcher on the basenode, the preparation methods always have to call themselves with their internal name for performance reasons. The prepare() method itself is only used by the renderer and node compiler.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Paragraph(children=None, id=None, style=None, class_=None)

A paragraph. Everything is in there :-) (except of block level stuff)

allowed_in_signatures = True

allowed in signatures?

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

is_linebreak_node = True

whether the node is just for creating line breaks

is_paragraph = True

this is true if the element is a paragraph node

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

property text

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

class inyoka.markup.nodes.Parser(parser)

Reference to a runtime parser.

property is_block_tag
prepare_html()
property text
class inyoka.markup.nodes.Preformatted(children=None, id=None, style=None, class_=None)

Preformatted text.

allowed_in_signatures = True

allowed in signatures?

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

is_raw = True

This is true of the node contains raw data. Raw data is data that is never processed by a transformer. For example if you don’t want to have typographical quotes this is the flag to alter. Use this only if the contents of that node matter (sourcecode etc.)

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Quote(children=None, id=None, style=None, class_=None)

A blockquote.

allowed_in_signatures = True

allowed in signatures?

allows_paragraphs = True

this is true of this element can contain paragraphs.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Raw(children=None)

A raw container.

is_raw = True

This is true of the node contains raw data. Raw data is data that is never processed by a transformer. For example if you don’t want to have typographical quotes this is the flag to alter. Use this only if the contents of that node matter (sourcecode etc.)

class inyoka.markup.nodes.Ruler

Newline with line.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Section(level, children=None, id=None, style=None, class_=None)
prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Size(size, children=None, id=None, style=None, class_=None)

Gives the embedded text a size. Like Underline it just exists because of backwards compatibility. Requires the font size in percent.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Small(children=None, id=None, style=None, class_=None)

This elements marks not so important text, so it removes importance. It’s usually rendered in a smaller font.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

allowed_in_signatures = False

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

property text

str(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.

class inyoka.markup.nodes.Span(children=None, id=None, style=None, class_=None)

Inline general text element

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Stroke(children=None, id=None, style=None, class_=None)

This element marks deleted text.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Strong(children=None, id=None, style=None, class_=None)

Holds children that are emphasized strongly. For HTML this will return a <strong> tag which is usually bold.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Sub(children=None, id=None, style=None, class_=None)

Marks text as subscript.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Sup(children=None, id=None, style=None, class_=None)

Marks text as superscript.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Table(children=None, id=None, style=None, class_=None)

A simple table. This can only contain table rows.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.TableCell(children=None, colspan=None, rowspan=None, align=None, valign=None, id=None, style=None, class_=None)

Only contained in a table row and renders to a table cell.

_html_tag = 'td'
is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.TableHeader(children=None, colspan=None, rowspan=None, align=None, valign=None, id=None, style=None, class_=None)

Exactly like a table cell but renders to <th>

_html_tag = 'th'
class inyoka.markup.nodes.TableRow(children=None, id=None, style=None, class_=None)

A row in a table. Only contained in a table and the only children nodes supported are table cells and headers.

is_block_tag = True

this is true if the element is a block tag. Block tags can contain paragraphs and inline elements. All containers that are not block tags are inline tags and can only contain inline tags.

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Text(text='')

Represents text.

allowed_in_signatures = True

allowed in signatures?

is_text_node = True

True if this is a text node

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

class inyoka.markup.nodes.Underline(children=None, id=None, style=None, class_=None)

This element exists for backwards compatibility to MoinMoin and should not be used. It generates a span tag with an “underline” class for HTML. It’s also allowed to not render this element in a special way.

allowed_in_signatures = True

allowed in signatures?

prepare_html()

The AST itself never survives the parsing process. At the end of parsing prepare_html is called and the iterator returned is converted into an active cacheable object (pickled if it contains dynamic rendering parts, otherwise dumped as utf-8 string).

inyoka.markup.nodes.error_box(title, message)

Create an error node.