invoke
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")
Content copied to clipboard
produces
hello
world
Content copied to clipboard
The empty document is the left and right unit to plus. That is
Document() + Document("hello") == Document("hello") == Document("hello") + Document()
Content copied to clipboard
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
Content copied to clipboard