Module doc

command-line doc rendering

Introduction#

The doc module contains a small set of functions used by the Greenhouse pager to render parts of the documentation pages. This is only documented for the sake of it. It's only intended use is by the Greenhouse pager.

Functions#


highlight#

doc.highlight(text)

Performs basic Lua code highlighting.

Parameters#

string text Code/text to do highlighting on.


renderCodeBlock#

doc.renderCodeBlock(text)

Assembles and renders a code block. This returns the supplied text based on the number of command line columns, and styles it to resemble a code block.

Parameters#

string text


renderInfoBlock#

doc.renderInfoBlock(type, text)

Renders an info block. An info block is a block of text with an icon and styled text block.

Parameters#

string type Type of info block. The only one specially styled is the warning.

string text