Skip to main content

compile_markdown

Function compile_markdown 

Source
pub fn compile_markdown(input: &str) -> String
Expand description

Compile a Markdown string to HTML.

Supports GitHub Flavored Markdown: tables, strikethrough, task lists.

ยงExample

let html = ssg_core::compile_markdown("# Hello\n\nWorld");
assert!(html.contains("<h1>Hello</h1>"));
assert!(html.contains("<p>World</p>"));