From 754c347873a4faf24be4827ad7ba0cd7229510e2 Mon Sep 17 00:00:00 2001 From: Jason Thompson Date: Tue, 23 Jul 2024 07:57:59 -0400 Subject: [PATCH] Adding remove_obsidian_comments option flag to the command. --- src/main.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main.rs b/src/main.rs index 1798d1b..e58dfe2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,6 +60,12 @@ struct Opts { default = "false" )] hard_linebreaks: bool, + #[options( + no_short, + help = "Remove Obsidian style comments from exported file", + default = "false" + )] + remove_obsidian_comments: bool, } fn frontmatter_strategy_from_str(input: &str) -> Result { @@ -100,6 +106,10 @@ fn main() { exporter.add_postprocessor(&softbreaks_to_hardbreaks); } + if args.remove_obsidian_comments { + exporter.add_postprocessor(&remove_obsidian_comments); + } + let tags_postprocessor = filter_by_tags(args.skip_tags, args.only_tags); exporter.add_postprocessor(&tags_postprocessor);