diff --git a/src/book/mod.rs b/src/book/mod.rs index 8a9ddd01..bc366e39 100644 --- a/src/book/mod.rs +++ b/src/book/mod.rs @@ -333,6 +333,10 @@ fn determine_renderers(config: &Config) -> Vec> { renderers } +fn default_preprocessors() -> Vec> { + vec![Box::new(LinkPreprocessor::new())] +} + /// Look at the `MDBook` and try to figure out what preprocessors to run. fn determine_preprocessors(config: &Config) -> Result>> { @@ -340,7 +344,7 @@ fn determine_preprocessors(config: &Config) -> Result>> { Some(ref p) => p, // If no preprocessor field is set, default to the LinkPreprocessor. This allows you // to disable the LinkPreprocessor by setting "preprocess" to an empty list. - None => return Ok(vec![Box::new(LinkPreprocessor::new())]) + None => return Ok(default_preprocessors()) }; let mut preprocessors: Vec> = Vec::new();