Label using automatic numbering and explicit label names together.
The base type for all block level elements.
A container of other Block elements.
A container of other Block elements. Such a container is usually also a Block itself.
A generic container element containing a list of blocks.
A generic container element containing a list of blocks. Can be used where a sequence of blocks must be inserted in a place where a single element is required by the API. Usually renderers do not treat the container as a special element and render its children as s sub flow of the parent container.
The format of a bullet list item.
A bullet list that may contain nested lists.
A single bullet list item consisting of one or more block elements.
The table caption.
A single cell, potentially spanning multiple rows or columns, containing one or more block elements.
The cell type specifies which part of the table the cell belongs to.
A citation that can be referred to by a CitationLink
by id.
A resolved link to a citation.
A reference to a citation with a matching label.
A reference to a citation with a matching label. Only part of the raw document tree and then removed by the rewrite rule that resolves link and image references.
A span of program code.
A span of program code. The content is a sequence of spans to support
the later integration of syntax highlighting systems. Without this support
the sequence will only consist of a single Text
element.
A block of program code.
A block of program code. The content is a sequence of spans to support
the later integration of syntax highlighting systems. Without this support
the sequence will only consist of a single Text
element.
The options (like styles) for a column table.
Contains the (optional) column specification of a table.
A comment that may be omitted by renderers.
A single configuration value to be merged with the top document config.
A single configuration value to be merged with the top document config. The value can be any type allowed by the Typesafe Config library (i.e. Boolean, Number, String, Map, Iterable).
A generic container.
A generic container.
Usually not mixed in directly, instead one of the sub-traits
TextContainer
, ListContainer
, SpanContainer
or BlockContainer
should be used.
A link element pointing to a location in a different document, with the span content representing the text (description) of the link.
An element that can be customized.
An element that can be customized. Represents options that are usually only used on few selected nodes and can control subtle differences often only relevant for renderers.
A decorated header where the level gets determined in the rewrite phase based on the decoration used and the order they appear in the document.
A decorated header where the level gets determined in the rewrite phase based on the decoration used and the order they appear in the document. The first decoration type encountered is used for level 1, the second for level 2, and so on.
Represents a definition that can be used to resolve references.
Represents a definition that can be used to resolve references.
Only part of the raw document tree and then removed or replaced by a rewrite rule before rendering.
A list of terms and their definitions.
A list of terms and their definitions.
Not related to the Definition
base trait.
A single definition item, containing the term and definition (as the content property).
A named document fragment that usually gets rendered separately from the main root element
The base class for all Elements forming the document tree.
The base class for all Elements forming the document tree.
Usually not extended directly, instead either Span
or
Block
should be picked as the base type for new element
types.
A generic container of other elements.
A generic container of other elements. Provides means to traverse, select and rewrite children of this container.
Usually not mixed in directly, instead one of the sub-traits
ListContainer
, SpanContainer
or BlockContainer
should be used.
A span of emphasized inline elements that may contain nested spans.
The format of enumerated list items.
An enumerated list that may contain nested lists.
A single enum list item consisting of one or more block elements.
Represents the type of an ordered list.
An external link element, with the span content representing the text (description) of the link.
An external link target, usually only part of the raw document tree and then removed by the rewrite rule that resolves link and image references.
Provides a fallback for elements the renderer does not know how to deal with.
A figure consists of an image, an optional caption, and an optional legend as the content
property.
A figure consists of an image, an optional caption, and an optional legend as the content
property.
The image
property is of type Span
as the image might be wrapped inside a link reference.
A footnote with resolved id and label that can be referred to by a FootnoteLink
by id.
A footnote definition that needs to be resolved to a final footnote by a rewrite rule based on the label type.
Base type for all types of footnote labels.
A resolved link to a footnote.
A reference to a footnote with a matching label.
A reference to a footnote with a matching label. Only part of the raw document tree and then removed by the rewrite rule that resolves link and image references.
A special type of paragraph that serves as a render hint.
A special type of paragraph that serves as a render hint.
Some renderers simplify the rendering of block elements containing only a single
paragraph and render the span content inline (e.g. a <li>
tag without a nested <p>
tag
for the paragraph).
Using this element as mandated by some edge cases in both the Markdown and reStructuredText
markup definitions prevents this.
A header element with a level, with 1 being the top level of the document.
Represents the decoration of a header.
Represents the decoration of a header. Concrete implementations need to be provided by the parser.
An inline image with a text description and optional title.
An image reference, the id pointing to the id of a LinkTarget
.
An image reference, the id pointing to the id of a LinkTarget
. Only part of the
raw document tree and then removed by the rewrite rule that resolves link and image references.
An internal link element, with the span content representing the text (description) of the link.
Points to the following block or span element, making it a target for links.
Represents an invalid element.
Represents an invalid element. Renderers can choose to either render the fallback or the system message or both.
Groups a block that could not be successfully parsed with a system message.
Groups a block that could not be successfully parsed with a system message. Renderers may then choose to just render the fallback, the message or both.
Groups a span that could not be successfully parsed with a system message.
Groups a span that could not be successfully parsed with a system message. Renderers may then choose to just render the fallback, the message or both.
A single line inside a line block.
A block containing lines which preserve line breaks and optionally nested line blocks.
A single item inside a line block.
An explicit hard line break.
The base type for all link elements.
The base type for all link elements.
In contrast to the reference type, it is only mixed in by elements representing resolved links that can be dealt with by renderers.
A link target pointing to another link target, acting like an alias.
A link reference, the id pointing to the id of a LinkTarget
.
A link reference, the id pointing to the id of a LinkTarget
. Only part of the
raw document tree and then removed by the rewrite rule that resolves link and image references.
The base type for all link targets.
The base type for all link targets. The id has to be
unique for the whole document across all types
of LinkTarget
implementations.
A container of list items.
A container of list items. Such a container is usually a Block itself.
The base type for all list items.
A span containing plain, unparsed text.
A literal block with unparsed text content.
Signals the severity of a system message.
Explicit numeric label.
Options for customizable elements.
An explicit hard page break.
A paragraph consisting of span elements.
A literal block with parsed text content.
Represents a single path in absolute and relative form.
A quoted block consisting of a list of blocks that may contain other nested quoted blocks and an attribution which may be empty.
Raw content that is usually specific to the specified output formats.
Raw content that is usually specific to the specified output formats. Can be used as both block and inline element. If supported by a parser it usually has to be explicitly enabled due to security concerns.
The base type for all reference elements.
The base type for all reference elements.
A reference points to some other node in the document tree and needs to be resolved and replaced by a rewrite rule before rendering. Therefore none of the available renderers include logic for dealing with references.
Specifies a custom render function that may override the rendered output for one or more node types.
Specifies a custom render function that may override the rendered output for one or more node types. For elements this function is not defined the renderer will fall back to the default renderer (or the next custom renderer, in case there are multiple).
Specifies how a particular element, document or document tree should be rewritten.
Specifies how a particular element, document or document tree should be rewritten.
If the rule is not defined for a specific element the old element remains
in the tree unchanged. If it returns None
then the node gets removed from the tree,
if it returns an element it will replace the old one. Of course the function may
also return the old element.
The root element of a document tree.
A single table row.
A single table row. In case some of the previous rows contain cells with a colspan greater than 1, this row may contain fewer cells than the number of columns in the table.
A horizontal rule.
A section of the document, consisting of a header and content in the form of a list of Block elements.
A section of the document, consisting of a header and content in the form of a list of Block elements. Sections may be nested inside other sections, they are arranged in a hierarchy based on the level of their header element.
Options
implementation for non-empty instances.
Options
implementation for non-empty instances.
For creating new instances it is usually more convenient to use the various factory objects. Example for creating an instance with an id and two styles applied:
val options = Id("myId") + Styles("style1","style2")
Likewise it is also often more convenient to use the corresponding extractors for pattern matching.
The base type for all inline elements.
A container of other Span elements.
A container of other Span elements. Such a container may be a Block or a Span itself.
A generic container element containing a list of spans.
A generic container element containing a list of spans. Can be used where a sequence of spans must be inserted in a place where a single element is required by the API. Usually renderers do not treat the container as a special element and render its children as s sub flow of the parent container. A span sequence is special in that in can be used as both a span and a block.
Bullet format based on a simple string.
A span of strong inline elements that may contain nested spans.
Message generated by the parser, usually to signal potential parsing problems.
Message generated by the parser, usually to signal potential parsing problems. They usually get inserted immediately after the block or span that caused the problem. It mixes in both the Span and Block trait so that it can appear in sequences of both types. By default messages are ignored by most renderers (apart from PrettyPrint), but they can be explicitly activated for a particular level.
A table consisting of a head and a body part and optional caption and column specification.
Contains the body rows of a table.
A container of table elements.
A table element, like a row, cell or column.
Contains the header rows of a table.
An element that only gets rendered for a specific output format.
Represents a temporary element only present in the raw document tree and then removed or replaced by a rewrite rule before rendering.
A simple text element.
A container for plain text.
The (optional) title of the document.
Generic block element with a title.
Generic block element with a title.
Often combined with the the styles
attribute of the options
parameter to provide
additional render hints.
Represents a URI which might also optionally be expressed as a local reference within the processed tree.
Arabic enumeration style (1, 2, 3...)
Label with automatic numbering.
Label with automatic symbol assignment.
A cell in the body part of the table.
Convenient factory for creating a Columns
instance based on the options
for the individual columns.
Debugging information that does not have any effect on the parser result.
A major issue that should be addressed, if ignored, the output will contain unpredictable errors.
A critical error that must be addressed, if ignored, the output will contain severe errors.
A cell in the head part of the table.
Factory and extractor for an Options
instance
with an id.
A minor issue that has very little or no effect on the parser result.
Lowercase letter enumeration style (a, b, c...)
Lowercase Roman numeral enumeration style (i, ii, iii, iv...)
Empty Options
implementation.
Companion for the Options trait.
Factory and extractor for an Options
instance
with style names.
Uppercase letter enumeration style (A, B, C...)
Uppercase Roman numeral enumeration style (I, II, III, IV...)
An issue that should be addressed, if ignored, there may be minor problems with the output.
Provides the elements of the document tree. The model is generic and not tied to any specific markup syntax like Markdown. Parsers may only support a subset of the provided element types in case the markup does not have matching syntax for some of them.
The abstract base classes are not sealed as the tree model is extensible. Renderers should anticipate unknown elements and add fallback rules for those.
The base class is
Element
which extendsProduct
, a constraint usually satisfied through defining the concrete types as case classes. Most concrete types are not expected to extendElement
directly though, but instead extend eitherBlock
orSpan
, the two major element types. This way they may be part of the content ofSpanContainer
orBlockContainer
types, traits that any element may mix in.