Expand description
Standalone markdown rendering.
For the (much more common) case of rendering markdown in doc-comments, see crate::html::markdown.
This is used when rendering a markdown file to an html file, without processing rust source code.
Re-exportsΒ§
use std::fmt;πuse std::fmt::Write as _;πuse std::fs::File;πuse std::fs::create_dir_all;πuse std::path::PathBuf;πuse std::sync::Arc;πuse rustc_span::SourceFile;πuse rustc_span::edition::Edition;πuse crate::config::RenderOptions;πuse crate::html::escape::Escape;πuse crate::html::markdown;πuse crate::html::markdown::ErrorCodes;πuse crate::html::markdown::HeadingOffset;πuse crate::html::markdown::IdMap;πuse crate::html::markdown::Markdown;πuse crate::html::markdown::MarkdownWithToc;πuse std::io::prelude::*;π
FunctionsΒ§
- extract_
leading_ πmetadata - Separate any lines at the start of the file that begin with
#or%. - render_
and_ πwrite - Render
input(e.g., βfoo.mdβ) into an HTML file inoutput(e.g., output = βbarβ => βbar/foo.htmlβ).