RenderFormat

trait RenderFormat[FMT] extends Format

Responsible for creating renderer instances for a specific output format. A renderer is simply a function of type (Formatter, Element) => String. In addition to the actual renderer function, the factory method also produces an instance of the generic FMT type which is the formatter API to use for custom renderer functions and which is specific to the output format.

trait Format
class Object
trait Matchable
class Any
object AST.type
object HTML.type
object XSLFO.type

Type members

Classlikes

case class Overrides(value: CustomRenderFunction[FMT]) extends RenderOverrides

Types

type CustomRenderFunction[FMT] = PartialFunction[(FMT, Element), String]

Value members

Abstract methods

def defaultRenderer: (FMT, Element) => String

The default renderer function for this output format. It may be overridden by extensions for individual nodes of the AST.

The default renderer function for this output format. It may be overridden by extensions for individual nodes of the AST.

The function takes both, a formatter instance and the element to render and returns a String in the target format.

def fileSuffix: String

The file suffix to use when rendering the output to a file. When transforming entire directories the suffix of the markup file will be automatically replaced by the suffix for the output format.

The file suffix to use when rendering the output to a file. When transforming entire directories the suffix of the markup file will be automatically replaced by the suffix for the output format.

The function for creating a new formatter for each render operation, based on the specified context containing the root element, the indentation mechanism and the delegate function for rendering child elements (that may contain user-specified extensions this render format implementation is not aware of).

The function for creating a new formatter for each render operation, based on the specified context containing the root element, the indentation mechanism and the delegate function for rendering child elements (that may contain user-specified extensions this render format implementation is not aware of).

The formatter created by this function (or copies created from it) will be used when invoking the default renderer.

Inherited methods

def description: String

Short string describing the markup or output format for tooling and logging.

Short string describing the markup or output format for tooling and logging.

Inherited from:
Format