Struct hoedown::renderer::html::Html [] [src]

pub struct Html { /* fields omitted */ }

HTML renderer

This can be used to render markdown documents to HTML. This type can also be leveraged to create custom renderers that delegate to the HTML renderer in certain cases, as shown in the Render trait documentation example.

let input = Buffer::from("EMPHASIZE");
let mut output = Buffer::new(64usize);
let mut html_renderer = Html::new(Flags::empty(), 0);

html_renderer.emphasis(&mut output, Some(&input));

assert_eq!(output.to_str().unwrap(), "<em>EMPHASIZE</em>");

Methods

impl Html
[src]

Construct a new html renderer given the provided html flags and table of contents nesting level.

The toc method can be used to construct a table of contents renderer which renders only the table of contents. The nesting_level on this method determines the maximum depth of headers to associate with the table of contents.

For this reason, if a table of contents is going to be rendered, this method's nesting_level argument should be the same as the one passed to the toc method.

Construct a table of contents renderer.

This renderer will only render the table of contents. If you want to have the headers of the document specify id attributes so that the table of contents items link to the correct header, you should render the document with the renderer returned by the new method with the same value for the nesting_level parameter.

Get a reference to the underlying hoedown renderer

Get a mutable reference to the underlying hoedown renderer

Trait Implementations

impl Render for Html
[src]

Converts the type into an underlying hoedown_renderer structure. Read more

Runs when a codeblock is encountered Read more

Runs when a block quote is encountered Read more

Runs when a header is encountered Read more

Runs when a horizontal rule is encountered Read more

Runs when a list is encountered. Read more

Runs when a list item is encountered. Read more

Runs when a paragraph is encountered. Read more

Runs when a table is encountered. Read more

Runs when a table header is encountered. Read more

Runs when a table body is encountered. Read more

Runs when a table row is encountered. Read more

Runs when a table cell is encountered. Read more

Runs when footnotes are encountered. Read more

Runs when a footnote definition is encountered. Read more

Runs when a raw html block is encountered. Read more

Runs when an autolink candidate is encountered. Read more

Runs when a code span is encountered. Read more

Runs when double emphasis is encountered. Read more

Runs when emphasis is encountered. Read more

Runs when underline is encountered. Read more

Runs when highlight is encountered. Read more

Runs when a quote is encountered. Read more

Runs when an image is encountered. Read more

Runs when a line break is encountered. Read more

Runs when a link is encountered. Read more

Runs when triple emphasis is encountered. Read more

Runs when strikethrough is encountered. Read more

Runs when superscript is encountered. Read more

Runs when a footnote reference is encountered. Read more

Runs when math is encountered. Read more

Runs when raw html span is encountered. Read more

Runs when an html entity is encountered. Read more

Runs when plain text is encountered. Read more

Runs before the document is processed. Read more

Runs after the document has been processed. Read more

Render the document to a buffer that is returned

Render the document into the given buffer

Render the document as inline to a buffer that is returned

Render the document as inline into the given buffer

impl Drop for Html
[src]

A method called when the value goes out of scope. Read more