From 62ee546640684e357bc8752beb08dcc5542d3f49 Mon Sep 17 00:00:00 2001 From: veradec Date: Sun, 1 Nov 2026 13:25:19 +0530 Subject: fix: allow dangerous html by default --- src/main.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index d94c4d5..0731e18 100644 --- a/src/main.rs +++ b/src/main.rs @@ -67,7 +67,10 @@ fn markdown_to_html(path: String, content: String) -> HTMLFile { let (date, title, description, toc, header) = meta_data_extractor(meta_data); - let mut html = markdown::to_html(&content[end + 7..]); + let mut options = markdown::Options::gfm(); + options.compile.allow_dangerous_html = true; + + let mut html = markdown::to_html_with_options(&content[end + 7..], &options).unwrap(); let mut file_name = std::path::Path::new(&path) .display() @@ -177,7 +180,6 @@ fn main() -> Result<()> { } generate_lists("public/".into()); - // copy static folder to public folder copy_dir(Path::new("static"), Path::new("public")); -- cgit v1.2.3