Skip to content

Enforce the absence of \\ in static files paths - #3223

Merged
notriddle merged 1 commit into
rust-lang:mainfrom
GuillaumeGomez:backslash
Sep 18, 2026
Merged

notriddle merged 1 commit into
rust-lang:mainfrom
GuillaumeGomez:backslash

Conversation

@GuillaumeGomez

Copy link
Copy Markdown
Member

Follow-up of #3222.

This changes the code structure so that we now enforce through the type system that the static files "path" (used for hbs rendering) don't have \ on Windows.

r? @notriddle

@rustbot rustbot added the S-waiting-on-review Status: waiting on a review label Sep 14, 2026
Comment thread crates/mdbook-html/src/html_handlebars/static_files.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Removed PathMap and replaced the HashMap key with SlashPath.

Comment thread crates/mdbook-html/src/html_handlebars/static_files.rs Outdated
@GuillaumeGomez

Copy link
Copy Markdown
Member Author

Replaced the lifetime with 'static.

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

And fixed CI too.

@notriddle

Copy link
Copy Markdown
Contributor

@bors r+

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

No r+ in here, we need to click the merge button. ;)

@GuillaumeGomez

Copy link
Copy Markdown
Member Author

(And for that you need to approve the pull request first)

@notriddle
notriddle added this pull request to the merge queue Sep 18, 2026
@notriddle

Copy link
Copy Markdown
Contributor

:headdesk:

Merged via the queue into rust-lang:main with commit ea1b91d Sep 18, 2026
20 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: waiting on a review label Sep 18, 2026
@GuillaumeGomez
GuillaumeGomez deleted the backslash branch September 18, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants