Explained what HtmlHandlebars::write_custom_function() does

This commit is contained in:
Michael Bryan 2017-06-24 15:50:51 +08:00
parent 33f3bec301
commit 4c187bcb9f
1 changed files with 2 additions and 0 deletions

View File

@ -178,6 +178,8 @@ impl HtmlHandlebars {
Ok(()) Ok(())
} }
/// Helper function to write a file to the build directory, normalizing
/// the path to be relative to the book root.
fn write_custom_file(&self, custom_file: &Path, book: &MDBook) -> Result<(), Box<Error>> { fn write_custom_file(&self, custom_file: &Path, book: &MDBook) -> Result<(), Box<Error>> {
let mut data = Vec::new(); let mut data = Vec::new();
let mut f = File::open(custom_file)?; let mut f = File::open(custom_file)?;