[−][src]Module rustdoc::html::markdown
Markdown formatting for rustdoc.
This module implements markdown formatting through the pulldown-cmark library.
#![feature(rustc_private)] extern crate rustc_span; use rustc_span::edition::Edition; use rustdoc::html::markdown::{IdMap, Markdown, ErrorCodes}; let s = "My *markdown* _text_"; let mut id_map = IdMap::new(); let md = Markdown(s, &[], &mut id_map, ErrorCodes::Yes, Edition::Edition2015, &None); let html = md.into_string(); // ... something using htmlRun
Structs
| CodeBlocks | Adds syntax highlighting and playground Run buttons to Rust code blocks. |
| ExtraInfo | |
| 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 | When |
| MarkdownHtml | A tuple struct like |
| MarkdownSummaryLine | A tuple struct like |
| MarkdownWithToc | A tuple struct like |
| Playground | |
| RustCodeBlock | |
| SummaryLine | Extracts just the first paragraph. |
Enums
| ErrorCodes | |
| Ignore | |
| Line | Controls whether a line will be hidden or shown in HTML output. |
Functions
| check_if_allowed_tag | |
| find_testable_code | |
| init_id_map | |
| map_line | |
| markdown_links | |
| opts | |
| plain_text_summary | Renders the first paragraph of the provided markdown as plain text. |
| rust_code_blocks | Returns a range of bytes for each code block in the markdown that is tagged as |
| slugify | Convert chars from a title for an id. |