Markdown Library (Md)
Two functions, both taking a Markdown string and converting it to something else.
Md.html(md: str) -> str
Markdown in, an HTML string out.
md-html.stof
#[main]
fn main() {
const md = "# Title\nList.\n- one\n- two";
pln(Md.html(md));
}Output
Md.json(md: str) -> str
Markdown in, a JSON string out — a full structural breakdown from the parser, not just the rendered result. More detail than Md.html, useful when you need to work with the document's structure rather than just display it.
md-json.stof
#[main]
fn main() {
const md = "# Title\nList.\n- one\n- two";
pln(Md.json(md));
}Output