damn formatter

This commit is contained in:
Jake Howard 2017-09-10 19:36:53 +01:00
parent 811f81bb40
commit fef80299ca
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 7 additions and 2 deletions

View file

@ -5,7 +5,10 @@ use std::path::PathBuf;
use config::{Config, References}; use config::{Config, References};
fn execute_pandoc(input: String, references: Option<References>) -> Result<PandocOutput, PandocError> { fn execute_pandoc(
input: String,
references: Option<References>,
) -> Result<PandocOutput, PandocError> {
let mut renderer = Pandoc::new(); let mut renderer = Pandoc::new();
renderer.set_output_format(pandoc::OutputFormat::Html, vec![]); renderer.set_output_format(pandoc::OutputFormat::Html, vec![]);
renderer.set_input_format(pandoc::InputFormat::Markdown, vec![]); renderer.set_input_format(pandoc::InputFormat::Markdown, vec![]);

View file

@ -64,7 +64,9 @@ pub fn get_references(config: Value) -> Option<References> {
} }
let references = config.get("references").unwrap(); let references = config.get("references").unwrap();
return Some(References { return Some(References {
bibliography: resolve_path(references.get("bibliography").unwrap().as_str().unwrap().into()), bibliography: resolve_path(
references.get("bibliography").unwrap().as_str().unwrap().into()
),
csl: unpack_csl(references.get("csl").unwrap().as_str().unwrap().into()) csl: unpack_csl(references.get("csl").unwrap().as_str().unwrap().into())
}); });
} }