std/markdown/markdown
std/markdown/src/markdown.trb
Markdown, the format: a value with the options of the reader.
type Markdown
type Markdown
CommonMark, with the tables of GitHub Flavored Markdown and front matter. The default reads both; without them the reader is CommonMark as the specification has it.
Examples
const markdown = Markdown()
const document = markdown.parse "# Title\n\nSome *text*.\n"
print document.html()
field frontMatter
frontMatter: Bool = true
Whether a first line --- opens front matter, closed by the next --- or ....
field tables
tables: Bool = true
Whether a paragraph line followed by a delimiter row (| --- | :-: |) is the header of a table.
fn parse
fn parse(text: String): MarkdownDocument
The document tree of text. Every text is a Markdown document, so this never fails.
fn html
fn html(text: String): String
text as HTML.