Skip to content

Commit

Permalink
misc:tweak markdown render options
Browse files Browse the repository at this point in the history
  • Loading branch information
rochacbruno committed Oct 22, 2024
1 parent e11b1db commit c59c4c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "marmite"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
license = "AGPL-3.0-or-later"
description = "MARkdown Makes sITEs is a very simple static site generator, mainly for simple blogs."
Expand Down
5 changes: 5 additions & 0 deletions src/markdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ pub fn process_file(path: &Path, site_data: &mut Data) -> Result<(), String> {

// TODO: Make the following options configurable?
options.render.unsafe_ = true; // Allow raw html
options.render.ignore_empty_links = true;
options.render.figure_with_caption = true;
// options.render.escape = false;
// options.render.full_info_string = true;
options.extension.tagfilter = false;
options.extension.strikethrough = true; // ~~text~~
options.extension.table = true;
Expand All @@ -24,6 +28,7 @@ pub fn process_file(path: &Path, site_data: &mut Data) -> Result<(), String> {
options.extension.spoiler = true; // this is ||secret|| (depends on css)
options.extension.greentext = true; // >not a quote
options.extension.shortcodes = true; // >not a quote
options.extension.header_ids = Some("tos-".to_string());

// The following 3 options breaks MathJax on themes
// options.extension.superscript = true; // 3^2^
Expand Down

0 comments on commit c59c4c9

Please sign in to comment.