added tables, autolinks and tasklist extensions
parent
b2a3ada543
commit
4f8ca9acae
|
@ -51,7 +51,14 @@ fn show_post(title: String) -> Template {
|
||||||
|
|
||||||
match posts::get_post(id) {
|
match posts::get_post(id) {
|
||||||
Ok(mut post) => {
|
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;
|
post.content = content;
|
||||||
|
|
||||||
context.insert("post", &post);
|
context.insert("post", &post);
|
||||||
|
|
Loading…
Reference in New Issue