Module rustdoc::html::markdown [−][src]
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::Markdown; let s = "My *markdown* _text_"; let html = format!("{}", Markdown(s, &[])); // ... something using htmlRun
Re-exports
use rustc::session; |
use std::cell::RefCell; |
use std::collections::HashMap; |
use std::collections::VecDeque; |
use std::default::Default; |
use std::fmt; |
use std::fmt::Write; |
use std::borrow::Cow; |
use std::ops::Range; |
use std::str; |
use syntax::feature_gate::UnstableFeatures; |
use syntax::codemap::Span; |
use html::render::derive_id; |
use html::toc::TocBuilder; |
use html::highlight; |
use test; |
use pulldown_cmark::html; |
use pulldown_cmark::Event; |
use pulldown_cmark::Tag; |
use pulldown_cmark::Parser; |
use pulldown_cmark::Options; |
use pulldown_cmark::OPTION_ENABLE_FOOTNOTES; |
use pulldown_cmark::OPTION_ENABLE_TABLES; |
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. |
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. |
Enums
Line |
Controls whether a line will be hidden or shown in HTML output. |
Constants
PLAYGROUND |
Functions
find_testable_code | |
map_line | |
markdown_links | |
plain_summary_line | |
slugify |
Convert chars from a title for an id. |