Lowercase heading IDs

This switches from ASCII lowercase to Unicode lowercase when generating
heading IDs. This brings mdbook more in line with other tools and sites
when they generate heading IDs. The generation still isn't 100% the same
as other tools and sites, but it is usually the same in most cases.

Closes https://github.com/rust-lang/mdBook/issues/1059
This commit is contained in:
Eric Huss
2025-11-04 16:01:06 -08:00
parent 475951c9ee
commit d0bde467e0
2 changed files with 8 additions and 4 deletions

View File

@@ -58,8 +58,11 @@ The following is a summary of the changes that may require your attention when u
[#2847](https://github.com/rust-lang/mdBook/pull/2847)
- Added support for admonitions. These are enabled by default, with the option `output.html.admonitions` to disable it.
[#2851](https://github.com/rust-lang/mdBook/pull/2851)
- Headers that start or end with HTML characters like `<`, `&`, or `>` now replace those characters in the link ID with `-` instead of being stripped. This brings the header ID generation closer to other tools and sites.
[#2844](https://github.com/rust-lang/mdBook/pull/2844)
- Header ID generation has some minor changes to bring the ID generation closer to other tools and sites:
- IDs now use Unicode lowercase instead of ASCII lowercase.
[#2922](https://github.com/rust-lang/mdBook/pull/2922)
- Headers that start or end with HTML characters like `<`, `&`, or `>` now replace those characters in the link ID with `-` instead of being stripped.
[#2844](https://github.com/rust-lang/mdBook/pull/2844)
### CLI changes