Skip to content

fix(html): reserve toc.md and document toc.html#3108

Open
leno23 wants to merge 1 commit into
rust-lang:masterfrom
leno23:feat/reserve-toc-md-3090
Open

fix(html): reserve toc.md and document toc.html#3108
leno23 wants to merge 1 commit into
rust-lang:masterfrom
leno23:feat/reserve-toc-md-3090

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 17, 2026

Summary

Fixes #3090.

  • Reject chapters named toc.md (same mechanism as print.md) so they cannot overwrite auto-generated toc.html
  • Document toc.html and reserved toc.md in the HTML renderer configuration guide
  • Add no_reserved_toc_filename integration test

Test plan

  • cargo test no_reserved_toc_filename
  • cargo test no_reserved_filename (existing print.md test unchanged)

Related: #3107 documents print.md / print.html separately.

Made with Cursor

Reject src/toc.md chapters so they cannot overwrite generated toc.html.
Document toc.html and the reserved toc.md name. Fixes rust-lang#3090.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 17, 2026
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 17, 2026

CI is green (15/15). Implements the reserve-toc.md behavior described in #3090 plus docs and an integration test. Thanks!

@leno23
Copy link
Copy Markdown
Author

leno23 commented May 17, 2026

Closing as duplicate of #3094, which already reserves toc.md and documents reserved filenames. Keeping the earlier PR for review.

@leno23 leno23 closed this May 17, 2026
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label May 17, 2026
@leno23
Copy link
Copy Markdown
Author

leno23 commented May 17, 2026

Reopening — CI was 15/15 green; closed by mistake. Ready for review (fixes #3090).

@leno23 leno23 reopened this May 17, 2026
@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label May 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: waiting on a review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document toc.md and toc.html and make toc.md a reserved file

2 participants