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 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 text(&self, s: &str) -> Self::Output
fn text(&self, s: &str) -> Self::Output
Convert a raw string into the format’s output type. Read more
Source§fn join(&self, items: Vec<Self::Output>, delimiter: &str) -> Self::Output
fn join(&self, items: Vec<Self::Output>, delimiter: &str) -> Self::Output
Join multiple outputs into a single output using a delimiter.
Source§fn finish(&self, output: Self::Output) -> String
fn finish(&self, output: Self::Output) -> String
Convert the intermediate output into the final result string. Read more
Source§fn quote(&self, content: Self::Output) -> Self::Output
fn quote(&self, content: Self::Output) -> Self::Output
Render content enclosed in outer quotation marks.
Source§fn affix(
&self,
prefix: &str,
content: Self::Output,
suffix: &str,
) -> Self::Output
fn affix( &self, prefix: &str, content: Self::Output, suffix: &str, ) -> Self::Output
Apply outer prefix and suffix strings to the content. Read more
Source§fn inner_affix(
&self,
prefix: &str,
content: Self::Output,
suffix: &str,
) -> Self::Output
fn inner_affix( &self, prefix: &str, content: Self::Output, suffix: &str, ) -> Self::Output
Apply inner prefix and suffix strings to the content. Read more
Source§fn wrap_punctuation(
&self,
wrap: &WrapPunctuation,
content: Self::Output,
) -> Self::Output
fn wrap_punctuation( &self, wrap: &WrapPunctuation, content: Self::Output, ) -> Self::Output
Wrap the content in specific punctuation (parentheses, brackets, or quotes).
Source§fn annotation(&self, content: Self::Output) -> Self::Output
fn annotation(&self, content: Self::Output) -> Self::Output
Render an annotation block. Read more
Source§fn link(&self, url: &str, content: Self::Output) -> Self::Output
fn link(&self, url: &str, content: Self::Output) -> Self::Output
Hyperlink the content to a URL.
Source§fn entry(
&self,
_id: &str,
content: Self::Output,
url: Option<&str>,
_metadata: &ProcEntryMetadata,
) -> Self::Output
fn entry( &self, _id: &str, content: Self::Output, url: Option<&str>, _metadata: &ProcEntryMetadata, ) -> Self::Output
Render a single bibliography entry with its unique identifier and optional link. Read more
Source§fn quote_marks(&self, depth: usize) -> (&'static str, &'static str)
fn quote_marks(&self, depth: usize) -> (&'static str, &'static str)
Return the opening and closing quote delimiters for a nesting depth. Read more
Source§fn quote_with_depth(&self, content: Self::Output, depth: usize) -> Self::Output
fn quote_with_depth(&self, content: Self::Output, depth: usize) -> Self::Output
Render content enclosed in quotation marks at a specific nesting depth.
Source§fn block_quote(&self, content: Self::Output) -> Self::Output
fn block_quote(&self, content: Self::Output) -> Self::Output
Render a block quotation.
Source§fn bullet_list(&self, items: Vec<Self::Output>) -> Self::Output
fn bullet_list(&self, items: Vec<Self::Output>) -> Self::Output
Render an unordered (bullet) list from pre-rendered item strings.
Source§fn ordered_list(&self, items: Vec<Self::Output>) -> Self::Output
fn ordered_list(&self, items: Vec<Self::Output>) -> Self::Output
Render an ordered (numbered) list from pre-rendered item strings.
Source§fn heading(&self, _level: u8, content: Self::Output) -> Self::Output
fn heading(&self, _level: u8, content: Self::Output) -> Self::Output
Render a heading at the given level (1 = top-level).
Source§fn code_block(&self, _lang: Option<&str>, content: Self::Output) -> Self::Output
fn code_block(&self, _lang: Option<&str>, content: Self::Output) -> Self::Output
Render a fenced or indented code block with an optional language hint. Read more
Source§fn inline_code(&self, content: Self::Output) -> Self::Output
fn inline_code(&self, content: Self::Output) -> Self::Output
Render inline code.
Source§fn hard_break(&self) -> Self::Output
fn hard_break(&self) -> Self::Output
Render a hard line break.
Source§fn semantic_with_attributes(
&self,
class: &str,
content: Self::Output,
_attributes: &[SemanticAttribute],
) -> Self::Output
fn semantic_with_attributes( &self, class: &str, content: Self::Output, _attributes: &[SemanticAttribute], ) -> Self::Output
Apply a semantic identifier plus optional attributes to the content. Read more
Source§fn citation(&self, _ids: Vec<String>, content: Self::Output) -> Self::Output
fn citation(&self, _ids: Vec<String>, content: Self::Output) -> Self::Output
Render a full citation container with one or more reference IDs.
Auto Trait Implementations§
impl Freeze for Markdown
impl RefUnwindSafe for Markdown
impl Send for Markdown
impl Sync for Markdown
impl Unpin for Markdown
impl UnsafeUnpin for Markdown
impl UnwindSafe for Markdown
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more