Skip to content

The markdown library

github-actions[bot] edited this page Jul 14, 2026 · 4 revisions

Overview

The markdown library implements functions to render markdown in the terminal using the terminal control codes. The markdown is "Pipefish-flavored", i.e. the colors red, yellow, green, cyan, blue, and purple can be produced by e.g. <R>foo</> for red.

Types

MdFormat = struct (leftMargin string, width int)

Specifies a left margin as a string and a width as an int that includes the width of the margin.

Functions

render(fmt MdFormat, s string) -> string

Renders the string in the given format.

render(fmt MdFormat, S snippet) -> string

Converts a snippet to a string by applying the string function to each of its elements and concatenates them, then renders the resulting string in the given format.

render(s string) -> string

Renders the string in a default format with no left margin and a width of 92.

render(S snippet) -> string

Converts a snippet to a string by applying the string function to each of its elements and concatenates them, then renders the resulting string in the given format.


This page is automatically generated from the Pipefish standard library. Any edits made directly to this wiki page will be overwritten the next time the documentation is regenerated.

🧿 Pipefish

Clone this wiki locally