diff options
| author | veradec <glitchmill.dyj3d@simplelogin.co> | 2026-11-01 13:25:19 +0530 |
|---|---|---|
| committer | veradec <glitchmill.dyj3d@simplelogin.co> | 2026-11-01 13:25:19 +0530 |
| commit | 62ee546640684e357bc8752beb08dcc5542d3f49 (patch) | |
| tree | ceb68fd6661683c7759d10d9785cec441830f1af | |
| parent | 9e992287e9f2ccc061edb3d2b7571abce7c503d1 (diff) | |
fix: allow dangerous html by default
| -rw-r--r-- | src/main.rs | 6 |
1 files 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")); |
