[−][src]Module rustdoc::html::markdown
Markdown formatting for rustdoc
This module implements markdown formatting through the pulldown-cmark
rust-library. This module exposes all of the
functionality through a unit-struct, Markdown
, which has an implementation
of fmt::Display
. Example usage:
#![feature(rustc_private)] use rustdoc::html::markdown::{IdMap, Markdown, ErrorCodes}; use std::cell::RefCell; let s = "My *markdown* _text_"; let mut id_map = IdMap::new(); let html = format!("{}", Markdown(s, &[], RefCell::new(&mut id_map), ErrorCodes::Yes)); // ... something using htmlRun
Structs
CodeBlocks |
Adds syntax highlighting and playground Run buttons to rust code blocks. |
Footnotes |
Moves all footnote definitions to the end and add back links to the references. |
HeadingLinks |
Make headings links with anchor ids and build up TOC. |
IdMap | |
LangString | |
LinkReplacer |
Make headings links with anchor ids and build up TOC. |
Markdown |
A unit struct which has the |
MarkdownHtml |
A unit struct like |
MarkdownSummaryLine |
A unit struct like |
MarkdownWithToc |
A unit struct like |
SummaryLine |
Extracts just the first paragraph. |
TestableCodeError |
Enums
ErrorCodes | |
Line |
Controls whether a line will be hidden or shown in HTML output. |
Constants
PLAYGROUND |
Functions
check_if_allowed_tag | |
find_testable_code | |
map_line | |
markdown_links | |
plain_summary_line | |
slugify |
Convert chars from a title for an id. |