Adding remove_obsidian_comments option flag to the command.
This commit is contained in:
parent
7912cb1f84
commit
754c347873
10
src/main.rs
10
src/main.rs
@ -60,6 +60,12 @@ struct Opts {
|
|||||||
default = "false"
|
default = "false"
|
||||||
)]
|
)]
|
||||||
hard_linebreaks: bool,
|
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> {
|
fn frontmatter_strategy_from_str(input: &str) -> Result<FrontmatterStrategy> {
|
||||||
@ -100,6 +106,10 @@ fn main() {
|
|||||||
exporter.add_postprocessor(&softbreaks_to_hardbreaks);
|
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);
|
let tags_postprocessor = filter_by_tags(args.skip_tags, args.only_tags);
|
||||||
exporter.add_postprocessor(&tags_postprocessor);
|
exporter.add_postprocessor(&tags_postprocessor);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user