diff options
author | Lars Wirzenius <liw@liw.fi> | 2023-04-05 18:58:56 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2023-04-08 16:51:58 +0300 |
commit | b4c998c713be9236e8c3e42ec64bd3ec9ac9bf27 (patch) | |
tree | 763eab2b0b28144e318d6a61f20021b45fe9099c | |
parent | 35ef38d41b41f4e9bb3873c56d3fcfe36782fcd4 (diff) | |
download | subplot-b4c998c713be9236e8c3e42ec64bd3ec9ac9bf27.tar.gz |
feat: drop support for pandoc-citeproc
Sponsored-by: author
-rw-r--r-- | src/policy.rs | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/policy.rs b/src/policy.rs index 972d081..e24bf8f 100644 --- a/src/policy.rs +++ b/src/policy.rs @@ -1,8 +1,5 @@ use std::path::{Component, Path, PathBuf}; -use log::trace; -use pandoc::{InputFormat, InputKind, OutputFormat, OutputKind, Pandoc, PandocOption}; - /// Get the base directory given the name of the markdown file. /// /// All relative filename, such as bindings files, are resolved @@ -17,23 +14,3 @@ pub fn get_basedir_from(filename: &Path) -> PathBuf { Some(x) => x.to_path_buf(), } } - -/// Add 'citeproc' to a Pandoc instance. -/// -/// This attempts to determine if `--citeproc` or `--filter pandoc-citeproc` -/// is needed, and then does that specific thing. -pub fn add_citeproc(pandoc: &mut Pandoc) { - let mut guesser = Pandoc::new(); - guesser.set_input(InputKind::Pipe("".to_string())); - guesser.set_input_format(InputFormat::Markdown, vec![]); - guesser.set_output_format(OutputFormat::Markdown, vec![]); - guesser.set_output(OutputKind::Pipe); - guesser.add_option(PandocOption::Citeproc); - if guesser.execute().is_ok() { - trace!("Discovered --citeproc"); - pandoc.add_option(PandocOption::Citeproc); - } else { - trace!("Discovered --filter pandoc-citeproc"); - pandoc.add_option(PandocOption::Filter("pandoc-citeproc".into())); - } -} |