invoke

operator fun invoke(): Document

Returns the empty document. The empty document behaves the same as Document(""), which means it has a height of 1, not 0. For example,

Document("hello") / Document() / Document("world")

produces

hello

world

The empty document is the left and right unit to plus. That is

Document() + Document("hello") == Document("hello") == Document("hello") + Document()

operator fun invoke(text: String): Document

Returns the document containing text converting all line breaks to lineBreak. Note that lineBreak may be undone by grouped:

>>> Document("hello\nworld")
hello
world

>>> Document("hello\nworld").grouped()
hello world