From 4f8ca9acae4536074b15d5c0a8036077ee141497 Mon Sep 17 00:00:00 2001 From: kirbylife Date: Sat, 21 Dec 2019 03:55:21 -0600 Subject: [PATCH] added tables, autolinks and tasklist extensions --- src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index aadbed5..c5e2b35 100644 --- a/src/main.rs +++ b/src/main.rs @@ -51,7 +51,14 @@ fn show_post(title: String) -> Template { match posts::get_post(id) { Ok(mut post) => { - let content = markdown_to_html(&post.content, &ComrakOptions::default()); + let comrak_options = ComrakOptions { + ext_table: true, + ext_autolink: true, + ext_tasklist: true, + ..ComrakOptions::default() + }; + + let content = markdown_to_html(&post.content, &comrak_options); post.content = content; context.insert("post", &post);