laika.tree

Elements

object Elements

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 extends Product, a constraint usually satisfied through defining the concrete types as case classes. Most concrete types are not expected to extend Element directly though, but instead extend either Block or Span, the two major element types. This way they may be part of the content of SpanContainer or BlockContainer types, traits that any element may mix in.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Elements
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class AutonumberLabel(label: String) extends FootnoteLabel with Product with Serializable

    Label using automatic numbering and explicit label names together.

  2. trait Block extends Element with Customizable

    The base type for all block level elements.

  3. trait BlockContainer[Self <: BlockContainer[Self]] extends Element with ElementContainer[Block, Self]

    A container of other Block elements.

  4. case class BlockSequence(content: Seq[Block], options: Options = Elements.this.NoOpt) extends Element with Block with BlockContainer[BlockSequence] with Product with Serializable

    A generic container element containing a list of blocks.

  5. trait BulletFormat extends AnyRef

    The format of a bullet list item.

  6. case class BulletList(content: Seq[ListItem], format: BulletFormat, options: Options = Elements.this.NoOpt) extends Element with Block with ListContainer[BulletList] with Product with Serializable

    A bullet list that may contain nested lists.

  7. case class BulletListItem(content: Seq[Block], format: BulletFormat, options: Options = Elements.this.NoOpt) extends Element with ListItem with BlockContainer[BulletListItem] with Product with Serializable

    A single bullet list item consisting of one or more block elements.

  8. case class Caption(content: Seq[Span] = immutable.this.Nil, options: Options = Elements.this.NoOpt) extends Element with TableElement with SpanContainer[Caption] with Product with Serializable

    The table caption.

  9. case class Cell(cellType: CellType, content: Seq[Block], colspan: Int = 1, rowspan: Int = 1, options: Options = Elements.this.NoOpt) extends Element with TableElement with BlockContainer[Cell] with Product with Serializable

    A single cell, potentially spanning multiple rows or columns, containing one or more block elements.

  10. sealed abstract class CellType extends AnyRef

    The cell type specifies which part of the table the cell belongs to.

  11. case class Citation(label: String, content: Seq[Block], options: Options = Elements.this.NoOpt) extends Element with Block with LinkTarget with BlockContainer[Footnote] with Product with Serializable

    A citation that can be referred to by a CitationLink by id.

  12. case class CitationLink(ref: String, label: String, options: Options = Elements.this.NoOpt) extends Element with Link with Product with Serializable

    A resolved link to a citation.

  13. case class CitationReference(label: String, source: String, options: Options = Elements.this.NoOpt) extends Element with Reference with Product with Serializable

    A reference to a citation with a matching label.

  14. case class Code(language: String, content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Span with SpanContainer[Code] with Product with Serializable

    A span of program code.

  15. case class CodeBlock(language: String, content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Block with SpanContainer[CodeBlock] with Product with Serializable

    A block of program code.

  16. case class Column(options: Options = Elements.this.NoOpt) extends Element with TableElement with Product with Serializable

    The options (like styles) for a column table.

  17. case class Columns(content: Seq[Column], options: Options = Elements.this.NoOpt) extends Element with TableElement with TableContainer[Columns] with Product with Serializable

    Contains the (optional) column specification of a table.

  18. case class Comment(content: String, options: Options = Elements.this.NoOpt) extends Element with Block with TextContainer with Product with Serializable

    A comment that may be omitted by renderers.

  19. case class ConfigValue(name: String, value: AnyRef, options: Options = Elements.this.NoOpt) extends Element with Block with Span with Temporary with Product with Serializable

    A single configuration value to be merged with the top document config.

  20. trait Container[+T] extends Element

    A generic container.

  21. case class CrossLink(content: Seq[Span], ref: String, path: PathInfo, title: Option[String] = scala.None, options: Options = Elements.this.NoOpt) extends Element with Link with SpanContainer[CrossLink] with Product with Serializable

    A link element pointing to a location in a different document, with the span content representing the text (description) of the link.

  22. trait Customizable extends Element

    An element that can be customized.

  23. case class DecoratedHeader(decoration: HeaderDecoration, content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Block with Temporary with SpanContainer[DecoratedHeader] with Product with Serializable

    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.

  24. trait Definition extends Element with Block with Temporary

    Represents a definition that can be used to resolve references.

  25. case class DefinitionList(content: Seq[DefinitionListItem], options: Options = Elements.this.NoOpt) extends Element with Block with ListContainer[DefinitionList] with Product with Serializable

    A list of terms and their definitions.

  26. case class DefinitionListItem(term: Seq[Span], content: Seq[Block], options: Options = Elements.this.NoOpt) extends Element with ListItem with BlockContainer[DefinitionListItem] with Product with Serializable

    A single definition item, containing the term and definition (as the content property).

  27. case class DocumentFragment(name: String, root: Element, options: Options = Elements.this.NoOpt) extends Element with Block with Temporary with Product with Serializable

    A named document fragment that usually gets rendered separately from the main root element

  28. abstract class Element extends Product

    The base class for all Elements forming the document tree.

  29. trait ElementContainer[+E <: Element, Self <: ElementContainer[E, Self]] extends Element with Container[Seq[E]] with ElementTraversal[Self]

    A generic container of other elements.

  30. case class Emphasized(content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Span with SpanContainer[Emphasized] with Product with Serializable

    A span of emphasized inline elements that may contain nested spans.

  31. case class EnumFormat(enumType: EnumType = Elements.this.Arabic, prefix: String = "", suffix: String = ".") extends Product with Serializable

    The format of enumerated list items.

  32. case class EnumList(content: Seq[ListItem], format: EnumFormat, start: Int = 1, options: Options = Elements.this.NoOpt) extends Element with Block with ListContainer[EnumList] with Product with Serializable

    An enumerated list that may contain nested lists.

  33. case class EnumListItem(content: Seq[Block], format: EnumFormat, position: Int, options: Options = Elements.this.NoOpt) extends Element with ListItem with BlockContainer[EnumListItem] with Product with Serializable

    A single enum list item consisting of one or more block elements.

  34. sealed abstract class EnumType extends AnyRef

    Represents the type of an ordered list.

  35. case class ExternalLink(content: Seq[Span], url: String, title: Option[String] = scala.None, options: Options = Elements.this.NoOpt) extends Element with Link with SpanContainer[ExternalLink] with Product with Serializable

    An external link element, with the span content representing the text (description) of the link.

  36. case class ExternalLinkDefinition(id: String, url: String, title: Option[String] = scala.None, options: Options = Elements.this.NoOpt) extends Element with Definition with Span with Product with Serializable

    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.

  37. trait Fallback extends AnyRef

    Provides a fallback for elements the renderer does not know how to deal with.

  38. case class Figure(image: Span, caption: Seq[Span], content: Seq[Block], options: Options = Elements.this.NoOpt) extends Element with Block with BlockContainer[Figure] with Product with Serializable

    A figure consists of an image, an optional caption, and an optional legend as the content property.

  39. case class Footnote(label: String, content: Seq[Block], options: Options = Elements.this.NoOpt) extends Element with Block with LinkTarget with BlockContainer[Footnote] with Product with Serializable

    A footnote with resolved id and label that can be referred to by a FootnoteLink by id.

  40. case class FootnoteDefinition(label: FootnoteLabel, content: Seq[Block], options: Options = Elements.this.NoOpt) extends Element with Definition with BlockContainer[Footnote] with Product with Serializable

    A footnote definition that needs to be resolved to a final footnote by a rewrite rule based on the label type.

  41. abstract class FootnoteLabel extends AnyRef

    Base type for all types of footnote labels.

  42. case class FootnoteLink(ref: String, label: String, options: Options = Elements.this.NoOpt) extends Element with Link with Product with Serializable

    A resolved link to a footnote.

  43. case class FootnoteReference(label: FootnoteLabel, source: String, options: Options = Elements.this.NoOpt) extends Element with Reference with Product with Serializable

    A reference to a footnote with a matching label.

  44. case class ForcedParagraph(content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Block with SpanContainer[ForcedParagraph] with Fallback with Product with Serializable

    A special type of paragraph that serves as a render hint.

  45. case class Header(level: Int, content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Block with SpanContainer[Header] with Product with Serializable

    A header element with a level, with 1 being the top level of the document.

  46. trait HeaderDecoration extends AnyRef

    Represents the decoration of a header.

  47. case class Image(text: String, url: String, title: Option[String] = scala.None, options: Options = Elements.this.NoOpt) extends Element with Link with Product with Serializable

    An inline image with a text description and optional title.

  48. case class ImageReference(text: String, id: String, source: String, options: Options = Elements.this.NoOpt) extends Element with Reference with Product with Serializable

    An image reference, the id pointing to the id of a LinkTarget.

  49. case class InternalLink(content: Seq[Span], ref: String, title: Option[String] = scala.None, options: Options = Elements.this.NoOpt) extends Element with Link with SpanContainer[InternalLink] with Product with Serializable

    An internal link element, with the span content representing the text (description) of the link.

  50. case class InternalLinkTarget(options: Options = Elements.this.NoOpt) extends Element with Block with Span with LinkTarget with Product with Serializable

    Points to the following block or span element, making it a target for links.

  51. trait Invalid[+E <: Element] extends Element

    Represents an invalid element.

  52. case class InvalidBlock(message: SystemMessage, fallback: Block, options: Options = Elements.this.NoOpt) extends Element with Block with Invalid[Block] with Product with Serializable

    Groups a block that could not be successfully parsed with a system message.

  53. case class InvalidSpan(message: SystemMessage, fallback: Span, options: Options = Elements.this.NoOpt) extends Element with Span with Invalid[Span] with Product with Serializable

    Groups a span that could not be successfully parsed with a system message.

  54. case class Line(content: Seq[Span], options: Options = Elements.this.NoOpt) extends LineBlockItem with SpanContainer[Line] with Product with Serializable

    A single line inside a line block.

  55. case class LineBlock(content: Seq[LineBlockItem], options: Options = Elements.this.NoOpt) extends LineBlockItem with BlockContainer[LineBlock] with Product with Serializable

    A block containing lines which preserve line breaks and optionally nested line blocks.

  56. abstract class LineBlockItem extends Element with Block

    A single item inside a line block.

  57. case class LineBreak(options: Options = Elements.this.NoOpt) extends Element with Span with Product with Serializable

    An explicit hard line break.

  58. trait Link extends Element with Span

    The base type for all link elements.

  59. case class LinkAlias(id: String, target: String, options: Options = Elements.this.NoOpt) extends Element with Definition with Span with Product with Serializable

    A link target pointing to another link target, acting like an alias.

  60. case class LinkReference(content: Seq[Span], id: String, source: String, options: Options = Elements.this.NoOpt) extends Element with Reference with SpanContainer[LinkReference] with Product with Serializable

    A link reference, the id pointing to the id of a LinkTarget.

  61. trait LinkTarget extends Element with Customizable

    The base type for all link targets.

  62. trait ListContainer[Self <: ListContainer[Self]] extends Element with ElementContainer[ListItem, Self]

    A container of list items.

  63. trait ListItem extends Element with Customizable

    The base type for all list items.

  64. case class Literal(content: String, options: Options = Elements.this.NoOpt) extends Element with Span with TextContainer with Product with Serializable

    A span containing plain, unparsed text.

  65. case class LiteralBlock(content: String, options: Options = Elements.this.NoOpt) extends Element with Block with TextContainer with Product with Serializable

    A literal block with unparsed text content.

  66. sealed abstract class MessageLevel extends Ordered[MessageLevel]

    Signals the severity of a system message.

  67. case class NumericLabel(number: Int) extends FootnoteLabel with Product with Serializable

    Explicit numeric label.

  68. sealed abstract class Options extends AnyRef

    Options for customizable elements.

  69. case class Paragraph(content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Block with SpanContainer[Paragraph] with Product with Serializable

    A paragraph consisting of span elements.

  70. case class ParsedLiteralBlock(content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Block with SpanContainer[ParsedLiteralBlock] with Product with Serializable

    A literal block with parsed text content.

  71. case class PathInfo(absolute: Path, relative: Path) extends Product with Serializable

    Represents a single path in absolute and relative form.

  72. case class QuotedBlock(content: Seq[Block], attribution: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Block with BlockContainer[QuotedBlock] with Product with Serializable

    A quoted block consisting of a list of blocks that may contain other nested quoted blocks and an attribution which may be empty.

  73. case class RawContent(formats: Seq[String], content: String, options: Options = Elements.this.NoOpt) extends Element with Block with Span with TextContainer with Product with Serializable

    Raw content that is usually specific to the specified output formats.

  74. trait Reference extends Element with Span with Temporary

    The base type for all reference elements.

  75. case class RootElement(content: Seq[Block]) extends Element with BlockContainer[RootElement] with Product with Serializable

    The root element of a document tree.

  76. case class Row(content: Seq[Cell], options: Options = Elements.this.NoOpt) extends Element with TableElement with TableContainer[Row] with Product with Serializable

    A single table row.

  77. case class Rule(options: Options = Elements.this.NoOpt) extends Element with Block with Product with Serializable

    A horizontal rule.

  78. case class Section(header: Header, content: Seq[Block], options: Options = Elements.this.NoOpt) extends Element with Block with BlockContainer[Section] with Product with Serializable

    A section of the document, consisting of a header and content in the form of a list of Block elements.

  79. case class SomeOpt(id: Option[String] = scala.None, styles: Set[String] = ...) extends Options with Product with Serializable

    Options implementation for non-empty instances.

  80. trait Span extends Element with Customizable

    The base type for all inline elements.

  81. trait SpanContainer[Self <: SpanContainer[Self]] extends Element with ElementContainer[Span, Self]

    A container of other Span elements.

  82. case class SpanSequence(content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Block with Span with SpanContainer[SpanSequence] with Product with Serializable

    A generic container element containing a list of spans.

  83. case class StringBullet(bullet: String) extends BulletFormat with Product with Serializable

    Bullet format based on a simple string.

  84. case class Strong(content: Seq[Span], options: Options = Elements.this.NoOpt) extends Element with Span with SpanContainer[Strong] with Product with Serializable

    A span of strong inline elements that may contain nested spans.

  85. case class SystemMessage(level: MessageLevel, content: String, options: Options = Elements.this.NoOpt) extends Element with Span with Block with TextContainer with Product with Serializable

    Message generated by the parser, usually to signal potential parsing problems.

  86. case class Table(head: TableHead, body: TableBody, caption: Caption = ..., columns: Columns = ..., options: Options = Elements.this.NoOpt) extends Element with Block with ElementTraversal[Table] with Product with Serializable

    A table consisting of a head and a body part and optional caption and column specification.

  87. case class TableBody(content: Seq[Row], options: Options = Elements.this.NoOpt) extends Element with TableElement with TableContainer[TableBody] with Product with Serializable

    Contains the body rows of a table.

  88. trait TableContainer[Self <: TableContainer[Self]] extends Element with TableElement with ElementContainer[TableElement, Self]

    A container of table elements.

  89. trait TableElement extends Element with Customizable

    A table element, like a row, cell or column.

  90. case class TableHead(content: Seq[Row], options: Options = Elements.this.NoOpt) extends Element with TableElement with TableContainer[TableHead] with Product with Serializable

    Contains the header rows of a table.

  91. trait Temporary extends Element

    Represents a temporary element only present in the raw document tree and then removed or replaced by a rewrite rule before rendering.

  92. case class Text(content: String, options: Options = Elements.this.NoOpt) extends Element with Span with TextContainer with Product with Serializable

    A simple text element.

  93. trait TextContainer extends Element with Container[String]

    A container for plain text.

  94. case class TitledBlock(title: Seq[Span], content: Seq[Block], options: Options = Elements.this.NoOpt) extends Element with Block with BlockContainer[TitledBlock] with Product with Serializable

    Generic block element with a title.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object Arabic extends EnumType with Product with Serializable

    Arabic enumeration style (1, 2, 3.

  7. object Autonumber extends FootnoteLabel with Product with Serializable

    Label with automatic numbering.

  8. object Autosymbol extends FootnoteLabel with Product with Serializable

    Label with automatic symbol assignment.

  9. object BodyCell extends CellType with Product with Serializable

    A cell in the body part of the table.

  10. object Columns extends Serializable

    Convenient factory for creating a Columns instance based on the options for the individual columns.

  11. object Debug extends MessageLevel with Product with Serializable

    Debugging information that does not have any effect on the parser result.

  12. object Error extends MessageLevel with Product with Serializable

    A major issue that should be addressed, if ignored, the output will contain unpredictable errors.

  13. object Fatal extends MessageLevel with Product with Serializable

    A critical error that must be addressed, if ignored, the output will contain severe errors.

  14. object HeadCell extends CellType with Product with Serializable

    A cell in the head part of the table.

  15. object Id

    Factory and extractor for an Options instance with an id.

  16. object Info extends MessageLevel with Product with Serializable

    A minor issue that has very little or no effect on the parser result.

  17. object LowerAlpha extends EnumType with Product with Serializable

    Lowercase letter enumeration style (a, b, c.

  18. object LowerRoman extends EnumType with Product with Serializable

    Lowercase Roman numeral enumeration style (i, ii, iii, iv.

  19. object NoOpt extends Options with Product with Serializable

    Empty Options implementation.

  20. object Options

    Companion for the Options trait.

  21. object Styles

    Factory and extractor for an Options instance with style names.

  22. object UpperAlpha extends EnumType with Product with Serializable

    Uppercase letter enumeration style (A, B, C.

  23. object UpperRoman extends EnumType with Product with Serializable

    Uppercase Roman numeral enumeration style (I, II, III, IV.

  24. object Warning extends MessageLevel with Product with Serializable

    An issue that should be addressed, if ignored, there may be minor problems with the output.

  25. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  26. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  29. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  31. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  32. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  33. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  34. final def notify(): Unit

    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  36. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  37. def toString(): String

    Definition Classes
    AnyRef → Any
  38. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped