Skip to main content

Module markdown

Module markdown 

Source
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 in output (e.g., output = β€œbar” => β€œbar/foo.html”).