diff --git a/src/lib.rs b/src/lib.rs index b4757c54..897768c5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -86,6 +86,7 @@ extern crate log; pub mod book; pub mod config; mod parse; +mod preprocess; pub mod renderer; pub mod theme; pub mod utils; diff --git a/src/renderer/html_handlebars/helpers/playpen.rs b/src/preprocess/links.rs similarity index 100% rename from src/renderer/html_handlebars/helpers/playpen.rs rename to src/preprocess/links.rs diff --git a/src/preprocess/mod.rs b/src/preprocess/mod.rs new file mode 100644 index 00000000..19b2f4d4 --- /dev/null +++ b/src/preprocess/mod.rs @@ -0,0 +1 @@ +pub mod links; diff --git a/src/renderer/html_handlebars/hbs_renderer.rs b/src/renderer/html_handlebars/hbs_renderer.rs index b1ba47ca..321fcc87 100644 --- a/src/renderer/html_handlebars/hbs_renderer.rs +++ b/src/renderer/html_handlebars/hbs_renderer.rs @@ -1,4 +1,5 @@ use renderer::html_handlebars::helpers; +use preprocess; use renderer::Renderer; use book::MDBook; use book::bookitem::{BookItem, Chapter}; @@ -46,7 +47,7 @@ impl HtmlHandlebars { // Parse for playpen links if let Some(p) = path.parent() { - content = helpers::playpen::render_playpen(&content, p); + content = preprocess::links::render_playpen(&content, p); } content = utils::render_markdown(&content, ctx.book.get_curly_quotes()); diff --git a/src/renderer/html_handlebars/helpers/mod.rs b/src/renderer/html_handlebars/helpers/mod.rs index 2fc287c2..62fc6149 100644 --- a/src/renderer/html_handlebars/helpers/mod.rs +++ b/src/renderer/html_handlebars/helpers/mod.rs @@ -1,3 +1,2 @@ pub mod navigation; pub mod toc; -pub mod playpen;