Expand description
Render Markdown beautifully in the terminal.
The renderer behind the mrk command: it turns Markdown into a Document of styled lines,
with code highlighted and Mermaid diagrams drawn as text or as PNG pictures. It never prints; writing the document
to a terminal is terminal’s job, behind the default cli feature.
use mrk::document::{self, Settings};
use mrk::markdown;
let mut settings = Settings::default();
settings.width = 40;
let rendered = markdown::render("# Notes\n\n- one\n- two\n", &settings);
print!("{}", document::printable(&rendered));Print only through sanitize, Line::printable or document::printable: Markdown is untrusted input and a
terminal interprets escape sequences. The guide is docs/library.md in the repository.