Eric Huss
b09c588ca9
Merge pull request #2785 from ehuss/ensure-test-built
...
Don't rebuild books in tests
2025-08-12 02:27:02 +00:00
Eric Huss
a6a60eef31
Add read_to_string to the prelude
...
This adds the `read_to_string` test helper to the test prelude so that
it is easier to use.
2025-08-11 19:26:05 -07:00
Eric Huss
95128b6662
Merge pull request #2784 from ehuss/debug-testsuite
...
Add debug option to the testsuite
2025-08-12 02:21:35 +00:00
Eric Huss
824e2a7681
Don't rebuild books in tests
...
This fixes an issue where the `check` methods would inadvertently
rebuild the books if the `mdbook build` command is run. Normally this
isn't too much of an issue unless the `build` command is run with
options that affect the output.
2025-08-11 19:21:03 -07:00
Eric Huss
43e690dd13
Add debug option to the testsuite
...
This adds a basic debug method to the testsuite command to help with
diagnosing tests that aren't working as expected.
2025-08-11 19:15:53 -07:00
Eric Huss
4a2d3a7e85
Merge pull request #2783 from ehuss/no-legacy
...
Remove legacy config support
2025-08-11 15:31:07 +00:00
Eric Huss
eda77b81db
Remove legacy config support
...
This removes the old legacy config that allowed certain things at the
top level.
The legacy switch was added in https://github.com/rust-lang/mdBook/pull/457
Closes https://github.com/rust-lang/mdBook/issues/2653
2025-08-11 08:25:04 -07:00
Eric Huss
8befcc74d1
Merge pull request #2779 from ehuss/non_exhaustive
...
Switch all public types to non_exhaustive
2025-08-10 00:07:29 +00:00
Eric Huss
5956092b4b
Switch all public types to non_exhaustive
...
This switches all public types to use non_exhaustive to make it easier
to make additions without a semver-breaking change.
Some of the ergonomics are hampered due to the lack of exhaustiveness
checking. Hopefully some day in the future,
non_exhaustive_omitted_patterns_lint or something like it will get
stabilized.
Closes https://github.com/rust-lang/mdBook/issues/1835
2025-08-09 17:02:01 -07:00
Eric Huss
c25e866796
Make SectionNumber field private
...
This removes the `pub` status of the SectionNumber field. The intent is
to make this potentially extensible in the future if we decide to add
more fields, or change its internal representation. With the existence
of the deref impls, generally this change shouldn't be visible except
for the constructor, which hopefully shouldn't be too cumbersome to use
`SectionNumber::new` instead.
2025-08-09 17:02:01 -07:00
Eric Huss
1d1274e53a
Merge pull request #2780 from ehuss/fix-nightly-panic-message
...
Fix test for nightly panic message change
2025-08-09 23:51:19 +00:00
Eric Huss
841c68d05e
Fix test for nightly panic message change
...
A recent nightly changed the format of the panic message. This updates
the test that was matching against this so it doesn't match the text
that has changed.
2025-08-09 16:45:41 -07:00
Eric Huss
37273ba8e0
Merge pull request #2401 from Roms1383/chore/upgrade-pulldown-cmark
...
Upgrade pulldown cmark to 0.13.0
2025-07-26 15:39:13 +00:00
Roms1383
91f04bc7ba
Upgrade pulldown-cmark to 0.13.0
2025-07-26 08:33:28 -07:00
Eric Huss
7cce45818a
Merge pull request #2776 from ehuss/remove-google-analytics
...
Remove google-analytics
2025-07-26 15:22:19 +00:00
Eric Huss
84fbd679e7
Merge pull request #2775 from ehuss/remove-multilingual
...
Remove the book.multilingual field
2025-07-26 15:17:00 +00:00
Eric Huss
aef12bbb20
Remove google-analytics
...
This was deprecated in https://github.com/rust-lang/mdBook/pull/1675 in
2021.
Closes https://github.com/rust-lang/mdBook/issues/2720
2025-07-26 08:15:37 -07:00
Gabor Szabo
00eba964ce
Remove the book.multilingual field
...
As it is seems it has never been in real use.
See #2636
2025-07-26 08:10:20 -07:00
Eric Huss
cf7762f57f
Merge pull request #2774 from ehuss/update-toml
...
Update toml to 0.9.2
2025-07-25 20:30:08 +00:00
Eric Huss
26319f4124
Update toml to 0.9.2
2025-07-25 13:24:27 -07:00
Eric Huss
f8e66db41c
Merge pull request #2773 from ehuss/remove-public-toml
...
Remove toml as a public dependency
2025-07-25 18:35:41 +00:00
Eric Huss
529cfc34ec
Remove toml as a public dependency
...
This removes toml as a public dependency. This reduces the exposure of
the public API, reduces exposure of internal implementation, and makes
it easier to make semver-incompatible changes to toml.
This is accomplished through a variety of changes:
- `get` and `get_mut` are removed.
- `get_deserialized_opt` is renamed to `get`.
- Dropped the AsRef for `get_deserialized_opt` for ergonomics, since
using an `&` for a String is not too much to ask, and the other
generic arg needs to be specified in a fair number of situations.
- Removed deprecated `get_deserialized`.
- Dropped `TomlExt` from the public API.
- Removed `get_renderer` and `get_preprocessor` since they were trivial
wrappers over `get`.
2025-07-25 11:29:07 -07:00
Eric Huss
8053774ba3
Fix Config.set working with the rust table
2025-07-25 11:29:07 -07:00
Eric Huss
fe76ee626f
Merge pull request #2772 from ehuss/unreachable-pub
...
Enable unreachable_pub
2025-07-25 16:08:22 +00:00
Eric Huss
f6c062fc98
Enable unreachable_pub
...
This lint can help make it clearer which items are actually exposed in
the public API.
2025-07-25 09:02:55 -07:00
Eric Huss
97d9078a32
Merge pull request #2766 from ehuss/crate-split
...
Split mdbook into multiple crates
2025-07-24 00:54:10 +00:00
Eric Huss
a397f64356
Add a section on how to run tests
2025-07-23 17:47:31 -07:00
Eric Huss
fad53f720f
Update guide to accommodate crate split
...
This updates the docs now that the crate has been split into multiple
crates.
2025-07-23 17:47:31 -07:00
Eric Huss
dcfb527342
Update crate docs
...
This updates the crate-level docs to add a little more detail for each
crate.
This also drops the `mdbook` library crate, as it is no longer needed.
2025-07-23 17:47:31 -07:00
Eric Huss
e0a4fb1ea9
Add READMEs for all new crates
2025-07-23 17:47:31 -07:00
Eric Huss
6e6518a7ae
Move the remaining dependencies to the workspace table
...
This is intended to have all dependencies only defined in the workspace
table, and crates can then refer to it.
2025-07-23 17:47:31 -07:00
Eric Huss
12fc0ff5c3
Clean up dependencies of mdbook
...
These are no longer used, or are dev-dependencies only.
2025-07-23 17:47:31 -07:00
Eric Huss
b8a7b6e846
Simplify MDBook::iter doc
...
The original was a little awkward, and I'm not sure what the tuple
syntax was intending to convey.
2025-07-23 17:47:31 -07:00
Eric Huss
9229e80499
Clean up some remaining uses of mdbook_core
...
These should be using the appropriate high-level crate.
2025-07-23 17:47:31 -07:00
Eric Huss
ae6c4522bb
Publicly re-export mdbook-core modules from mdbook-driver
...
The intent here is to make mdbook-core a private dependency that the
user shouldn't need.
2025-07-23 17:47:31 -07:00
Eric Huss
fdebbfdce2
Remove pulldown-cmark from mdbook-core
...
This dependency is no longer directly used.
2025-07-23 17:47:31 -07:00
Eric Huss
40745600a3
Finish move of MDBook to mdbook-driver
2025-07-23 17:47:31 -07:00
Eric Huss
5a31947eb7
Move MDBook to mdbook-driver
...
This is a pure git rename in order to make sure that git can follow
history. The next commit will integrate these into mdbook-driver.
2025-07-23 17:47:31 -07:00
Eric Huss
d758753551
Finish moving builtin renderers to mdbook-driver
2025-07-23 17:47:28 -07:00
Eric Huss
9b27b14985
Move built-in renderers to mdbook-driver
...
This is a pure git rename in order to make sure that git can follow
history. The next commit will integrate these into mdbook-driver.
2025-07-23 17:40:57 -07:00
Eric Huss
f5fc54461a
Finish moving built-in preprocessors to mdbook-driver
2025-07-23 17:40:57 -07:00
Eric Huss
6aac696ee1
Move built-in preprocessors to mdbook-driver
...
This is a pure git rename in order to make sure that git can follow
history. The next commit will integrate these into mdbook-driver.
2025-07-23 17:40:57 -07:00
Eric Huss
c8571f592c
Add mdbook-driver
...
This is intended to hold the high-level MDBook type.
2025-07-23 17:40:57 -07:00
Eric Huss
7eccd1d556
Finish move of hbs_renderer to mdbook-html
...
This updates everything for the move of hbs_renderer to mdbook-html.
2025-07-23 17:40:57 -07:00
Eric Huss
06324d8b24
Move hbs_renderer to mdbook-html
...
This is a pure git rename in order to make sure that git can follow
history. The next commit will integrate these into mdbook-html.
Additional commits will refactor/move/remove items.
2025-07-23 17:40:57 -07:00
Eric Huss
753780f653
Finish move of theme to mdbook-html
...
This updates everything for the move of theme to mdbook-html. There
will be followup commits that will be doing more cleanup here.
2025-07-23 17:40:57 -07:00
Eric Huss
3087686559
Move theme to mdbook-html
...
This is a pure git rename in order to make sure that git can follow
history. The next commit will integrate these into mdbook-html.
Additional commits will refactor/move/remove items.
2025-07-23 17:40:52 -07:00
Eric Huss
6805740e20
Add mdbook-html
...
This new crate will hold the HTML renderer and related front-end parts.
2025-07-23 17:29:55 -07:00
Eric Huss
8f3b6b4776
Move markdown support to mdbook-markdown
...
This moves all the code responsible for markdown processing to the
mdbook-markdown crate.
2025-07-23 17:29:55 -07:00
Eric Huss
3278f84373
Move renderer types to mdbook-renderer
...
This sets up mdbook-renderer with the intent of being the core
library that renderers use to implement the necessary interactions.
2025-07-23 17:29:55 -07:00