#common-mark #askama

askama-markdown-cmark

Askama filter for markdown, using pulldown-cmark

1 unstable release

0.1.0 Jul 10, 2024

#1289 in Text processing

21 downloads per month

Apache-2.0/MIT

4KB

An askama filter to render markdown to html.

Example

use askama::Template;

use askama_markdown_cmark::filters;

#[derive(Template)]
#[template(source = "{{ content|markdown_cmark|safe }}", ext="html")]
struct Example<'a> {
    content: &'a str,
}

fn main() -> Result<()> {
    println!("{}", Example { content: "## Hello world\n\nTesting ~~x~~ **y** _z_\n" }.render().unwrap());

    Ok(())
}

Dependencies

~4MB
~80K SLoC