packages

markdown

0.1.0Official

CommonMark + GFM (tables, callouts, footnotes, heading anchors) to HTML

published · MIT OR Apache-2.0 · 0 dependencies

Official: use markdown::..; alone is enough, the first build adds it. Or:

nabi add markdown

Then in your code

use markdown::render;
deps: {
    "markdown": Dep::version("^0.1.0"),
},

CI packages.nabi-lang.org License: MIT OR Apache-2.0

A Nabi library that converts Markdown to HTML. It covers the main parts of CommonMark plus GitHub extensions (tables, strikethrough, callouts, footnotes, heading anchors), and renders the pages of docs.nabi-lang.org.

Add it

nabi add markdown

Needs Nabi 0.1 or later.

Usage

use markdown::render;

let doc = render("# Title\n\nBody *emphasis*\n");
println(doc.html);     // <h1 id="title">...Title</h1> ...
println(doc.title);    // Title

Use render_untrusted for Markdown of unknown origin, and pass Options to map link destinations or highlight code blocks. There is no highlighter dependency; pass one through Options.code (pairs well with nabi-syntax).

Docs

https://packages.nabi-lang.org/packages/markdown/latest/docs

License

Licensed under either of MIT or Apache-2.0, at your option.

Readme from github.com/nabi-lang/markdown at 909d7ddd.