diff --git a/src/book/mod.rs b/src/book/mod.rs index b33ec6f00c..3845e17ec2 100644 --- a/src/book/mod.rs +++ b/src/book/mod.rs @@ -256,6 +256,16 @@ impl MDBook { self } + /// Clear all registered renderers. + pub fn clear_renderers(&mut self) { + self.renderers.clear(); + } + + /// Clear all registered preprocessors. + pub fn clear_preprocessors(&mut self) { + self.preprocessors.clear(); + } + /// Run `rustdoc` tests on the book, linking against the provided libraries. pub fn test(&mut self, library_paths: Vec<&str>) -> Result<()> { // test_chapter with chapter:None will run all tests.