Commit Graph

3083 Commits

Author SHA1 Message Date
github-actions[bot]
8bd3c52abf Update cargo dependencies
```
name               old req compatible latest new req
====               ======= ========== ====== =======
axum               0.8.6   0.8.7      0.8.7  0.8.7
clap               4.5.51  4.5.53     4.5.53 4.5.53
clap_complete      4.5.60  4.5.61     4.5.61 4.5.61
indexmap           2.12.0  2.12.1     2.12.1 2.12.1
tower-http         0.6.6   0.6.7      0.6.7  0.6.7
tracing            0.1.41  0.1.43     0.1.43 0.1.43
tracing-subscriber 0.3.20  0.3.22     0.3.22 0.3.22
name                    old req compatible latest new req
====                    ======= ========== ====== =======
pulldown-cmark-to-cmark 21.0.0  21.1.0     21.1.0 21.1.0
```
2025-12-01 00:37:48 +00:00
Marco Ieni
de8202a67f Merge pull request #2965 from Kobzol/publish-environment
Add publish environment to deploy job
2025-11-25 10:47:21 +00:00
Jakub Beránek
8f277a0d39 Add publish environment to deploy job 2025-11-25 09:41:27 +01:00
Eric Huss
d63aeb6526 Merge pull request #2955 from ehuss/bump-version
Update to 0.5.1
v0.5.1
2025-11-20 01:44:03 +00:00
Eric Huss
eb83d080f6 Update to 0.5.1 2025-11-19 17:36:49 -08:00
Eric Huss
710ec2755d Merge pull request #2932 from vitorfloriano/scrollbar-bg-transparent
Change scrollbar background to transparent
2025-11-20 01:22:36 +00:00
Eric Huss
5d64d0e5f2 Merge pull request #2953 from ehuss/fix-heading-nav-level
Fix heading nav level
2025-11-20 01:13:35 +00:00
Eric Huss
718ceecfa2 Fix heading nav depth
This fixes an issue where when a heading goes from a larger to a smaller
level, it was going back too far so that subsequent headings would be at
a lower level than they should have been.

Fixes https://github.com/rust-lang/mdBook/issues/2944
2025-11-19 17:06:49 -08:00
Eric Huss
09616e31af Add a test to validate the structure of the heading nav
This checks the entire structure of the heading nav for this test. It
currently is not handling nesting properly.

Having a large inline string like this may not be the easiest to
maintain or be able to see the structure. I don't see a way to format it
in goml.
2025-11-19 16:50:35 -08:00
Eric Huss
7e7a3b495e Merge pull request #2952 from ehuss/ignore-top-env-keys
Ignore invalid top-level environment variable config keys
2025-11-20 00:45:41 +00:00
Eric Huss
d39deca76a Ignore invalid top-level environment variable config keys
This changes it so that top-level environment variable config keys like
`MDBOOK_FOO` are ignored instead of generating an error. It's just too
inconvenient since it is common for users to set environment variables
like `MDBOOK_VERSION` or whatever for their own scripts.
2025-11-19 16:38:47 -08:00
Eric Huss
8385e750ec Merge pull request #2951 from ehuss/fa-improvements
Font Awesome fixes and improvements
2025-11-20 00:24:35 +00:00
Eric Huss
8571d70b52 Update the documentation for Font Awesome
This updates the documentation to try to improve the Font Awesome
support.
2025-11-19 16:15:53 -08:00
Eric Huss
4b5ea14ee1 Support new font-awesome class names
In version 6, Font Awesome changed so that the class names look like
`fa-solid fa-cat` instead of `fas fa-cat`. This updates so that it
handles this new style.
2025-11-19 16:04:34 -08:00
Eric Huss
c53379e3ac Add a test using full fontawesome type names
In version 6, Font Awesome changed so that the class names look like
`fa-solid fa-cat` instead of `fas fa-cat`. mdBook is not handling the
new style.
2025-11-19 15:56:54 -08:00
Eric Huss
6bf7fadc29 Merge pull request #2943 from ehuss/config-changelog
Add some more 0.5 Config API changes
v0.5.0
2025-11-17 23:27:24 +00:00
Eric Huss
d193775a3b Add some more 0.5 Config API changes
I forgot these in https://github.com/rust-lang/mdBook/pull/2942
2025-11-17 15:21:42 -08:00
Eric Huss
8e4bc4aecd Merge pull request #2942 from ehuss/fix-env-config
Add error handling to env config handling
2025-11-17 22:48:19 +00:00
Eric Huss
2afad43bdd Add error handling to env config handling
This adds several changes to how environment variables are handled to
more closely align with how configs are handled, and to fix an issue
with replacing entire tables. The changes are:

- Top-level tables like `MDBOOK_BOOK` now *replace* the contents of the
  `book` table instead of merging it. This adds consistency with how all
  the other environment objects work.
- Fixed allowing top-level replacement of `MDBOOK_BOOK` and
  `MDBOOK_OUTPUT`. This was inadvertently recently broken.
- Added ability to replace top-level `MDBOOK_RUST`. I don't recall why
  that wasn't included.
- Reject invalid keys like `MDBOOK_FOO`.
- Reject unknown keys, like `MDBOOK_BOOK='{"xyz": 123}'`
- Reject invalid types, like `MDBOOK_BOOK='{"title": 123}'`
2025-11-17 14:38:58 -08:00
Eric Huss
5445458d1a Add tests for various environment config issues
These currently aren't working as expected.
2025-11-17 12:47:01 -08:00
Eric Huss
ef476a7329 Merge pull request #2940 from ehuss/bump-version
Update to 0.5.0
2025-11-17 19:17:23 +00:00
Eric Huss
262afdc2f8 Update to 0.5.0
This is the stable release of 0.5.0. No changes have been made since
0.5.0-beta.2.
2025-11-17 08:57:52 -08:00
Vitor Floriano
ef10e720a5 Change scrollbar background to transparent
Closes #2930.
2025-11-12 18:16:31 -03:00
Eric Huss
fff6087f36 Merge pull request #2929 from ehuss/bump-version
Update to 0.5.0-beta.2.
v0.5.0-beta.2
2025-11-08 02:08:05 +00:00
Eric Huss
922f0d8ad4 Update to 0.5.0-beta.2.
I expect this to be the last pre-release before 0.5.
2025-11-07 18:00:52 -08:00
Eric Huss
ab1325b213 Merge pull request #2928 from ehuss/update-dependencies-no-fork
Disable update-dependencies on forks
2025-11-07 18:11:59 +00:00
Eric Huss
63b159741b Disable update-dependencies on forks
This disables the update-dependencies cron job in forks. It's not
uncommon for people to leave GitHub Actions enabled in a fork (which in
my experience seems to be the default?), and this unfortunately means
that this job will run in all those forks which is probably not what
people want.
2025-11-07 10:06:38 -08:00
Eric Huss
4a9a517f27 Merge pull request #2927 from ehuss/fix-unbalanced-html-in-header
Handle unclosed HTML tags inside a markdown element
2025-11-06 15:38:21 +00:00
Eric Huss
700839f77f Handle unclosed HTML tags inside a markdown element
This fixes an issue where it was panicking due to an unbalanced HTML tag
when exiting a markdown element. The problem was that the tag stack was
left non-empty when processing was finished due to `end_tag` being out
of sync with the pulldown-cmark event tags.

There really should be better validation that the stack is in sync and
balanced, but this should address the main culprit of the interplay of
raw HTML tags and pulldown-cmark events.
2025-11-06 07:31:45 -08:00
Eric Huss
152132458e Move end tag handling to a function
This is to reduce the size of the processing function.
2025-11-06 07:25:55 -08:00
Eric Huss
054da77b6a Add test for unbalanced html in a header
This is unexpectedly panicking.
2025-11-06 07:25:53 -08:00
Eric Huss
9a5e8dbb0a Merge pull request #2926 from ehuss/fix-fa-icons
Fix missing font-awesome icons in the guide
2025-11-06 14:53:56 +00:00
Eric Huss
63c45cd879 Fix missing font-awesome icons in the guide
After the switch in https://github.com/rust-lang/mdBook/pull/1330, some
of the icons were renamed.
2025-11-06 06:48:03 -08:00
Eric Huss
bc7ca458b6 Merge pull request #2923 from LikeLakers2/hide-resize-handle-on-noscript
Hide the sidebar resize indicator when JS isn't available
2025-11-06 03:41:26 +00:00
MichiRecRoom
07fb33f5da Hide the sidebar resize handle when scripting isn't available 2025-11-05 19:11:09 -08:00
Eric Huss
7d1566860c Merge pull request #2924 from ehuss/html-end-tags
Add better handling for unbalanced HTML tags
2025-11-06 03:02:40 +00:00
Eric Huss
f0117ec3df Add a comment about synchronizing the event stack 2025-11-05 11:45:46 -08:00
Eric Huss
22065ebc79 Give a warning for unclosed HTML tags
This changes the internal error message to a warning to let the user
know that the HTML tags are unbalanced. In the future this will be a
denyable lint.

This is a very primitive approach of just ignoring the end tag. Ideally
it should recover using the standard HTML parsing algorithm, since there
is a chance that there will be a cascade of errors under certain
unbalanced situations.
2025-11-05 11:42:43 -08:00
Eric Huss
5905bf1d85 Factor out Token::TagToken to combat rightwards drift 2025-11-05 11:33:58 -08:00
Eric Huss
1646e4923a Add a test for HTML tags out of sync 2025-11-05 11:19:42 -08:00
Eric Huss
1e190137c3 Add a check for unclosed elements on the stack
This checks for any unclosed elements when processing is finished. This
is intended to detect invalid HTML in the source, or bugs in the tree
builder. Raw HTML elements generate a warning (which in the future will
be a configurable lint). All other sync errors are internal errors as
they are not expected, and it would be helpful to know if they ever
happen.
2025-11-05 11:14:39 -08:00
Eric Huss
4417f8cb0a Add a test for unclosed HTML tags 2025-11-05 10:45:46 -08:00
Eric Huss
cc7f8be496 Merge pull request #2922 from ehuss/header-id-lowercase
Lowercase heading IDs
2025-11-05 00:14:42 +00:00
Eric Huss
051fc9f01d Add a comment about the intent of HTML id generation 2025-11-04 16:05:36 -08:00
Eric Huss
d0bde467e0 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
2025-11-04 16:05:31 -08:00
Eric Huss
475951c9ee Merge pull request #2921 from ehuss/header-id-changelog
Add note to changelog about a change in heading ID generation
2025-11-04 23:06:17 +00:00
Eric Huss
5b2cc1735b Add note to changelog about a change in heading ID generation
I didn't fully appreciate that this changed in
https://github.com/rust-lang/mdBook/pull/2844 which changed how text
content was collected from heading tags.
2025-11-04 14:56:08 -08:00
Eric Huss
1c00395230 Merge pull request #2920 from rust-lang/renovate/cargo-semver-checks-0.x
Update cargo-semver-checks to v0.45.0
2025-11-02 04:10:45 +00:00
renovate[bot]
9799326590 Update cargo-semver-checks to v0.45.0 2025-11-01 20:40:49 +00:00
Eric Huss
2546c8cc60 Merge pull request #2916 from rust-lang/update-dependencies
Update cargo dependencies
2025-11-01 04:14:37 +00:00