NURLNURL registrynurl-lang.org →

← md2html

md2html 0.1.0 API

markdown.nu

md2html — a small Markdown → HTML renderer for NURL.

Ported from the renderer that powers the NURL playground's doc viewer (nurlapi's /readme, /stdlib-docs, …), extracted here as a reusable, dependency-light registry library. Pure text → text: md_to_html takes Markdown source and returns an owned HTML String.

Supported:

Not supported (by design — they don't appear in typical READMEs): nested lists by indent, definition lists, footnotes, reference-style links, setext headings, raw HTML passthrough.

Surface: ( md_to_html s src ) → String rendered HTML (caller owns it)

API

@ md_to_html s src → String


main.nu

md2html — render Markdown to HTML from the command line.

Reads Markdown from stdin (or --file) and writes HTML to stdout. With --full it emits a complete, styled HTML document; otherwise it emits an HTML fragment (just the rendered body), handy for embedding.

md2html < README.md # fragment to stdout md2html -f README.md --full # full styled page md2html -f doc.md -t "My Doc" -F # full page with a custom title

Built on the argz registry package (flags) and this package's own markdown renderer library.

API

@ main → i