Change with_renderer/with_preprocessor to overwrite

This changes `with_renderer` and `with_preprocessor` to replace any
extensions of the same name instead of just appending to the list. This
is necessary for rust-lang's build process, because we replace the
preprocessors with local ones. Previously, mdbook would just print an
error, but continue working. With the change that preprocessors are no
longer optional by default, it is now required that we have a way to
replace the existing entries.
This commit is contained in:
Eric Huss
2025-08-18 11:14:29 -07:00
parent 25c47ed0bc
commit 338a9b424e
7 changed files with 51 additions and 63 deletions

View File

@@ -37,6 +37,7 @@ font-awesome-as-a-crate = "0.3.0"
futures-util = "0.3.31"
handlebars = "6.3.2"
hex = "0.4.3"
indexmap = "2.10.0"
ignore = "0.4.23"
log = "0.4.27"
mdbook-core = { path = "crates/mdbook-core" }