Got my logic around the wrong way

This commit is contained in:
Michael Bryan 2018-08-30 22:57:01 +08:00
parent 4d7027f8a7
commit 40ede19103
No known key found for this signature in database
GPG Key ID: E9C602B0D9A998DC
1 changed files with 3 additions and 4 deletions

View File

@ -401,10 +401,9 @@ fn interpret_custom_renderer(key: &str, table: &Value) -> Box<Renderer> {
/// The `build.use-default-preprocessors` config option can be used to ensure /// The `build.use-default-preprocessors` config option can be used to ensure
/// default preprocessors always run if they support the renderer. /// default preprocessors always run if they support the renderer.
fn preprocessor_should_run(preprocessor: &Preprocessor, renderer: &Renderer, cfg: &Config) -> bool { fn preprocessor_should_run(preprocessor: &Preprocessor, renderer: &Renderer, cfg: &Config) -> bool {
if cfg.build.use_default_preprocessors && // default preprocessors should be run by default (if supported)
is_default_preprocessor(preprocessor) && if cfg.build.use_default_preprocessors && is_default_preprocessor(preprocessor) {
preprocessor.supports_renderer(renderer.name()) { return preprocessor.supports_renderer(renderer.name());
return true;
} }
let key = format!("preprocessor.{}.renderers", preprocessor.name()); let key = format!("preprocessor.{}.renderers", preprocessor.name());