HTMLFormatter

case class HTMLFormatter(renderChild: (HTMLFormatter, Element) => String, currentElement: Element, parents: List[Element], pathTranslator: PathTranslator, path: Path, indentation: Indentation, messageFilter: MessageFilter, closeEmptyTags: Boolean) extends TagFormatter[HTMLFormatter]

API for renderers that produce HTML output.

Value parameters:
currentElement

the active element currently being rendered

indentation

the indentation mechanism for this formatter

messageFilter

the filter to apply before rendering runtime messages

parents

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

path

the virtual (translated) path of the document getting rendered

pathTranslator

translates paths of input documents to the corresponding output path

renderChild

the function to use for rendering child elements

Companion:
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Type members

Types

Value members

Concrete methods

def attributes(tag: String, styleHint: StyleHint, attrs: Seq[(String, String)]): String
override def emptyElement(tagName: String, styleHint: StyleHint, attrs: (String, String)*): String
Definition Classes
override def emptyElement(tagName: String): String
Definition Classes

Inherited methods

def attribute(name: String, value: String): String

Renders the specified attribute including a preceding space character.

Renders the specified attribute including a preceding space character.

Inherited from:
TagFormatter
def attributes(attrs: Seq[(String, String)]): String

Renders the specified attributes (passed as name-value tuples), including a preceding space character.

Renders the specified attributes (passed as name-value tuples), including a preceding space character.

Inherited from:
TagFormatter
def child(element: Element): String

Renders the specified element on the current line.

Renders the specified element on the current line.

Inherited from:
BaseFormatter
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.

Inherited from:
BaseFormatter
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.

Inherited from:
BaseFormatter
def comment(content: String): String

Renders an HTML/XML comment.

Renders an HTML/XML comment.

Inherited from:
TagFormatter
def element(tagName: String, styleHint: StyleHint, content: Seq[Element], attrs: (String, String)*): String

Renders an element with the specified tag name, attributes derived from the style hint and content consisting of the provided child elements, all rendered on the same line.

Renders an element with the specified tag name, attributes derived from the style hint and content consisting of the provided child elements, all rendered on the same line.

Inherited from:
TagFormatter
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.

Inherited from:
BaseFormatter
def indented(f: HTMLFormatter => 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.

Inherited from:
BaseFormatter
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.

Inherited from:
BaseFormatter
def indentedElement(tagName: String, styleHint: StyleHint, content: Seq[Element], attrs: (String, String)*): String

Renders an element with the specified tag name, attributes derived from the style hint and indented content consisting of the provided child elements.

Renders an element with the specified tag name, attributes derived from the style hint and indented content consisting of the provided child elements.

Inherited from:
TagFormatter
def optAttributes(attrs: (String, Option[String])*): Seq[(String, String)]

Filters empty values from the provided list of name-value pairs.

Filters empty values from the provided list of name-value pairs.

Inherited from:
TagFormatter
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def rawElement(tagName: String, styleHint: StyleHint, content: String, attrs: (String, String)*): String

Renders an element with the specified tag name, attributes derived from the style hint and content based on the provided string that is interpreted as already rendered in the target format. That means that no character escaping will be performed on the provided content.

Renders an element with the specified tag name, attributes derived from the style hint and content based on the provided string that is interpreted as already rendered in the target format. That means that no character escaping will be performed on the provided content.

Inherited from:
TagFormatter
def text(str: String): String

Renders the specified string on the same line, with all special XML/HTML characters converted to entities.

Renders the specified string on the same line, with all special XML/HTML characters converted to entities.

Inherited from:
TagFormatter
def textElement(tagName: String, styleHint: StyleHint, txt: String, attrs: (String, String)*): String

Renders a text element with the specified tag name, attributes derived from the style hint and content based on the provided text content that gets rendered with all special XML/HTML characters converted to entities.

Renders a text element with the specified tag name, attributes derived from the style hint and content based on the provided text content that gets rendered with all special XML/HTML characters converted to entities.

Inherited from:
TagFormatter
def withMinIndentation(minIndent: Int)(f: HTMLFormatter => String): String

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.

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.

Inherited from:
BaseFormatter
def withoutIndentation(f: HTMLFormatter => 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.

Inherited from:
BaseFormatter

Concrete fields

Inherited 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.

Inherited from:
BaseFormatter