pub struct Markdown;Expand description
Renders processed citations and bibliography entries as CommonMark markup.
Trait Implementations§
Source§impl OutputFormat for Markdown
impl OutputFormat for Markdown
Source§fn heading(&self, level: u8, content: Self::Output) -> Self::Output
fn heading(&self, level: u8, content: Self::Output) -> Self::Output
Render a heading using ATX syntax (#, ##, …).
Source§fn emph(&self, content: Self::Output) -> Self::Output
fn emph(&self, content: Self::Output) -> Self::Output
Render emphasis as *content* (CommonMark italic).
Source§fn strong(&self, content: Self::Output) -> Self::Output
fn strong(&self, content: Self::Output) -> Self::Output
Render strong emphasis as **content** (CommonMark bold).
Source§fn small_caps(&self, content: Self::Output) -> Self::Output
fn small_caps(&self, content: Self::Output) -> Self::Output
Render small caps as raw inline HTML.
CommonMark has no native small-caps syntax. Raw <span> HTML is passed
through by Pandoc’s CommonMark reader and most other processors.
Source§fn superscript(&self, content: Self::Output) -> Self::Output
fn superscript(&self, content: Self::Output) -> Self::Output
Render superscript as raw inline HTML.
CommonMark has no native superscript syntax. Raw <sup> HTML is passed
through by Pandoc and most processors.
Source§fn semantic(&self, _class: &str, content: Self::Output) -> Self::Output
fn semantic(&self, _class: &str, content: Self::Output) -> Self::Output
Render a semantic class as a plain passthrough.
CommonMark has no attribute syntax. Content is returned unchanged so
citations remain readable plain text. Use --format html or --format djot
if machine-readable semantic spans are needed.
Source§fn visible_runs(&self, fragment: &str) -> Vec<Range<usize>>
fn visible_runs(&self, fragment: &str) -> Vec<Range<usize>>
Strip */** emphasis delimiters, <span>/<sup> raw-HTML wrappers,
and a [content](url) link’s [/](url) markup — keeping link text
visible but the URL hidden. A bracket pair not followed by (url)
(i.e. from Self::wrap_punctuation’s WrapPunctuation::Brackets)
keeps its brackets visible, since those are house-style punctuation.
Backslash-escaped characters are visible as themselves.