Skip to main content

render_markdown

Function render_markdown 

Source
pub fn render_markdown(content: &str) -> String
Expand description

Render markdown to HTML with default options, sanitizing the output.

This is a convenience wrapper around MarkdownParser::parse with OutputFormat::Html. On error, the (escaped) input is wrapped in a <div class="render-error"> block so callers can always insert the result into a page.