askama-markdown-cmark

Crates.ioaskama-markdown-cmark
lib.rsaskama-markdown-cmark
version0.1.0
sourcesrc
created_at2024-07-10 14:57:47.075696
updated_at2024-07-10 14:57:47.075696
descriptionAskama filter for markdown, using pulldown-cmark.
homepage
repositoryhttps://github.com/blakehawkins/askama-markdown-cmark
max_upload_size
id1298370
size9,684
(blakehawkins)

documentation

https://docs.rs/askama-markdown-cmark

README

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(())
}
Commit count: 1

cargo fmt