From 4c187bcb9fe336d4481fc118ed16a08c487ff9bb Mon Sep 17 00:00:00 2001 From: Michael Bryan Date: Sat, 24 Jun 2017 15:50:51 +0800 Subject: [PATCH] Explained what HtmlHandlebars::write_custom_function() does --- src/renderer/html_handlebars/hbs_renderer.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index aa7c7ee7..d64a3fab 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -178,6 +178,8 @@ impl HtmlHandlebars { 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> { let mut data = Vec::new(); let mut f = File::open(custom_file)?;