No description
Find a file
Eric Huss 7bdea7c085 Don't rebuild preprocessor map during test
This fixes a problem where custom preprocessors were not being
registered when running tests. This was caused by the test function
rebuilding the preprocessor map.

This removes the code that was rebuilding the preprocessors and removing
the IndexPreprocessor when running tests. Skipping IndexPreprocessor was
added back in https://github.com/rust-lang/mdBook/pull/741 to fix
https://github.com/rust-lang/mdBook/issues/724 which was caused by
https://github.com/rust-lang/mdBook/pull/685 which added the
IndexPreprocessor.

Additionally, https://github.com/rust-lang/mdBook/pull/1986 added
running *all* preprocessors.

The IndexPreprocessor was removed because in the past the code was
testing against the source directly, and the path from `chapter.path` is
the converted `index.md` file, and that filename does not exist in the
source. This isn't a problem anymore because due to
https://github.com/rust-lang/mdBook/pull/891 it is not reading from the
`src` directory.

Note that this results in a minor change where the chapter path changes
from `README.md` to `index.md` in the output and the `--chapter` option.
I think I'm ok with that change, though it would be easy to switch it
back if that's an issue.
2025-12-10 13:42:15 -08:00
.cargo Add an xtask to help with running tests 2025-09-26 18:55:21 -07:00
.github Add publish environment to deploy job 2025-11-25 09:41:27 +01:00
ci Add job to automatically update dependencies 2025-09-24 16:05:14 -07:00
crates Don't rebuild preprocessor map during test 2025-12-10 13:42:15 -08:00
examples Set up new workspace publish workflow 2025-09-26 17:40:34 -07:00
guide Fix link for parse_input() in preprocessors.md 2025-12-01 18:40:55 -05:00
src Move get_404_output_file to HtmlConfig 2025-09-19 18:11:29 -07:00
tests Don't rebuild preprocessor map during test 2025-12-10 13:42:15 -08:00
.git-blame-ignore-revs Add more rustfmt commits to git blame ignore 2025-10-20 13:31:03 -07:00
.gitattributes Mark more font files as binary 2025-04-05 20:41:36 -04:00
.gitignore Support multiple books in the GUI tests 2025-10-15 07:00:33 -07:00
Cargo.lock Update Rust crate html5ever to 0.36.0 2025-12-01 18:31:50 +00:00
Cargo.toml Update Rust crate html5ever to 0.36.0 2025-12-01 18:31:50 +00:00
CHANGELOG.md Update to 0.5.1 2025-11-19 17:36:49 -08:00
CODE_OF_CONDUCT.md add explicit code of conduct, copying other rust-lang repos 2021-07-26 11:52:24 -07:00
CONTRIBUTING.md Update to 0.5.1 2025-11-19 17:36:49 -08:00
eslint.config.mjs Lint HBS JS templates 2025-08-25 15:15:47 -07:00
LICENSE Create LICENSE 2015-07-29 01:11:30 +02:00
package.json Update dependency browser-ui-test to v0.22.3 2025-11-01 00:33:02 +00:00
README.md README.md: update workflow status badge 2025-02-13 11:01:08 -05:00
rustfmt.toml Add rustfmt.toml 2025-07-23 17:29:55 -07:00
triagebot.toml Add triagebot range-diff feature 2025-09-24 17:00:52 -07:00

mdBook

CI Status crates.io LICENSE

mdBook is a utility to create modern online books from Markdown files.

Check out the User Guide for a list of features and installation and usage information. The User Guide also serves as a demonstration to showcase what a book looks like.

If you are interested in contributing to the development of mdBook, check out the Contribution Guide.

License

All the code in this repository is released under the Mozilla Public License v2.0, for more information take a look at the LICENSE file.