Adding remove_obsidian_comments option flag to the command.

This commit is contained in:
Jason Thompson 2024-07-23 07:57:59 -04:00
parent 7912cb1f84
commit 754c347873

View File

@ -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<FrontmatterStrategy> {
@ -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);