rustdown_cli/lib.rs
1pub mod markdown;
2pub mod render;
3
4/// Render markdown to any `termcolor::WriteColor` output.
5///
6/// This is the same renderer used by the CLI, but exposes a writer-injected entrypoint
7/// for testing and embedding.
8pub fn render_markdown_to_writer(
9 md: &str,
10 preserve_fences: bool,
11 output: &mut impl termcolor::WriteColor,
12) -> std::io::Result<()> {
13 markdown::render_markdown(md, preserve_fences, output)
14}