PrettyDoc

Documentation for PrettyDoc.

PrettyDoc.DocType

Combinatorial documentation objects, which has the following constructors:

  • Doc_Concat(left::Doc, right::Doc) Concatenates two documents,and the line is not broken.
  • Doc_VSep(elements::Vector{Doc}) Concatenates a vector of documents with the line separator "\n".
  • Doc_Align(document::Doc) Aligns the document using the current indentation.
  • Doc_Indent(delta::Int, document::Doc) Locally indents the document by delta spaces.
  • Doc_Segment(segment::String) A segment of text.
  • Doc_Breakable(document::Doc) Inidicating the end of the document is breakable.
  • Doc_Empty Do nothing.
source
PrettyDoc.indentMethod

Indent a document by delta spaces. Negative deltas are allowed.

P.S: You might use doc >> 2 or doc << 2 to indent document objects.

source
PrettyDoc.segMethod

Making a document from a string. Note that including line ending characters can cause ugly pretty printing.

source
PrettyDoc.seplistofFunction
seplistof(separator, elements)

Create a document that represents a list of elements, separated by the given separator.

source