@@ -480,6 +480,11 @@ pub struct BuildConfig {
480
480
pub use_default_preprocessors : bool ,
481
481
/// Extra directories to trigger rebuild when watching/serving
482
482
pub extra_watch_dirs : Vec < PathBuf > ,
483
+ /// Should missing a preprocessor be considered an error?
484
+ /// By default, the application exits if a preprocessor is missing.
485
+ /// Set this flag to ̀false` to raise a warning instead and continue generation,
486
+ /// even if the book may be generated incorrectly.
487
+ pub error_on_missing_preprocessor : bool ,
483
488
}
484
489
485
490
impl Default for BuildConfig {
@@ -489,6 +494,7 @@ impl Default for BuildConfig {
489
494
create_missing : true ,
490
495
use_default_preprocessors : true ,
491
496
extra_watch_dirs : Vec :: new ( ) ,
497
+ error_on_missing_preprocessor : true ,
492
498
}
493
499
}
494
500
}
@@ -815,6 +821,7 @@ mod tests {
815
821
build-dir = "outputs"
816
822
create-missing = false
817
823
use-default-preprocessors = true
824
+ error-on-missing-preprocessor = false
818
825
819
826
[output.html]
820
827
theme = "./themedir"
@@ -856,6 +863,7 @@ mod tests {
856
863
create_missing : false ,
857
864
use_default_preprocessors : true ,
858
865
extra_watch_dirs : Vec :: new ( ) ,
866
+ error_on_missing_preprocessor : false ,
859
867
} ;
860
868
let rust_should_be = RustConfig { edition : None } ;
861
869
let playground_should_be = Playground {
@@ -1067,6 +1075,7 @@ mod tests {
1067
1075
create_missing : true ,
1068
1076
use_default_preprocessors : true ,
1069
1077
extra_watch_dirs : Vec :: new ( ) ,
1078
+ error_on_missing_preprocessor : true ,
1070
1079
} ;
1071
1080
1072
1081
let html_should_be = HtmlConfig {
0 commit comments