Renderer

fs2.data.text.render.Renderer
trait Renderer[Event]

Attributes

Source
Renderer.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def doc(evt: Event): Stream[Pure, DocEvent]

Transforms the event into a stream of document events.

Transforms the event into a stream of document events. The stream may be partial (e.g. opening a group when the event describes a new tree node).

Attributes

Source
Renderer.scala

Concrete methods

def words(text: String, wordBoundary: String): Stream[Pure, DocEvent]

Splits words in the given text into a stream of document events.

Splits words in the given text into a stream of document events. This is a utility method, when you want to reformat a text using the pretty printer. The pretty printing algorithm assumes that each DocEvent.Text is an atomic value, so if it contains new lines it can break the computations.

Between 2 words, it adds a DocEvent.Line event. Empty lines are represented as two consecutive line breaks.

Value parameters

text

The text to split

wordBoundary

The regular expression on which to split words

Attributes

Source
Renderer.scala

Concrete fields

Increment current indentation level by one.

Increment current indentation level by one.

Attributes

Source
Renderer.scala

Behaves like a new line, or as a space if undone by a group.

Behaves like a new line, or as a space if undone by a group.

Attributes

Source
Renderer.scala

Behaves like a new line, or as empty if undone by a group.

Behaves like a new line, or as empty if undone by a group.

Attributes

Source
Renderer.scala

Empty if it fits on the page, otherwise renders a new line.

Empty if it fits on the page, otherwise renders a new line.

Attributes

Source
Renderer.scala

Behaves like a space if it fits on the page, otherwise as a new line.

Behaves like a space if it fits on the page, otherwise as a new line.

Attributes

Source
Renderer.scala

Decrement current indentation level by one.

Decrement current indentation level by one.

Attributes

Source
Renderer.scala