Formatter

laika.api.format.Formatter
See theFormatter companion object
abstract class Formatter

API basis for renderers that produce character output.

Attributes

Companion
object
Source
Formatter.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class TagFormatter

Members list

Type members

Types

type Rep <: Formatter

Attributes

Source
Formatter.scala

Value members

Concrete methods

def child(element: Element): String

Renders the specified element on the current line.

Renders the specified element on the current line.

Attributes

Source
Formatter.scala
def childPerLine(elements: Seq[Element]): String

Renders the specified elements, each of them on a new line using the current level of indentation.

Renders the specified elements, each of them on a new line using the current level of indentation.

Attributes

Source
Formatter.scala
def children(elements: Seq[Element]): String

Renders the specified elements, all on the same line, without any separators.

Renders the specified elements, all on the same line, without any separators.

Attributes

Source
Formatter.scala

The active element currently being rendered.

The active element currently being rendered.

Attributes

Source
Formatter.scala
def forMessage(message: RuntimeMessage)(whenEnabled: String): String

Renders the specified string only when the given message has at least the minimum message level defined for this formatter instance.

Renders the specified string only when the given message has at least the minimum message level defined for this formatter instance.

Attributes

Source
Formatter.scala
def indented(f: Rep => String): String

Invokes the specified render function with a new formatter that is indented one level to the right of this formatter.

Invokes the specified render function with a new formatter that is indented one level to the right of this formatter.

Attributes

Source
Formatter.scala
def indentedChildren(elements: Seq[Element]): String

Renders the specified elements, each of them on a new line with the indentation increased one level to the right.

Renders the specified elements, each of them on a new line with the indentation increased one level to the right.

Attributes

Source
Formatter.scala
def parents: List[Element]

The stack of parent elements of this formatter in recursive rendering, with the root element being the last in the list.

The stack of parent elements of this formatter in recursive rendering, with the root element being the last in the list. Does not include the current element.

Attributes

Source
Formatter.scala
def path: Path

The target path of the currently rendered document.

The target path of the currently rendered document.

Attributes

Source
Formatter.scala

Translates paths of input documents to the corresponding output path.

Translates paths of input documents to the corresponding output path.

This API needs to be used for rendering all internal links.

Attributes

Source
Formatter.scala

The styles the new renderer should apply to the rendered elements.

The styles the new renderer should apply to the rendered elements.

Only used for some special render formats like XSL-FO. In case of HTML, for example, styles are only copied over to the output directory and not processed by the formatter at all. For all those formats this set is always empty.

Attributes

Source
Formatter.scala
def withMinIndentation(minIndent: Int)(f: Rep => String): String

Invokes the specified render function with a formatter that has at least the specified minimum level of indentation.

Invokes the specified render function with a formatter that has at least the specified minimum level of indentation. If this instance already has an indentation equal or greater to this value, the current level of indentation will be kept.

Attributes

Source
Formatter.scala
def withoutIndentation(f: Rep => String): String

Invokes the specified render function with a new formatter that has all indentation disabled.

Invokes the specified render function with a new formatter that has all indentation disabled.

This is usually only required when rendering literal elements or source code where rendered whitespace would be significant.

Attributes

Source
Formatter.scala

Concrete fields

val newLine: String

A newline character followed by whitespace matching the indentation level of this instance.

A newline character followed by whitespace matching the indentation level of this instance.

Attributes

Source
Formatter.scala