Skip to content

No syntax / code highlighting #1932

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
steckes opened this issue May 16, 2025 · 5 comments
Closed

No syntax / code highlighting #1932

steckes opened this issue May 16, 2025 · 5 comments

Comments

@steckes
Copy link

steckes commented May 16, 2025

On the website https://doc.rust-lang.org/rust-by-example/ I don't get any syntax highlighting.

Here a picture of the Hello World page:

Image

I don't get any highlighting locally (building main branch), and neither in Firefox nor Chrome (both on Fedora 42). I also tried to change the themes.

Highlighting works fine in the Rust book: https://doc.rust-lang.org/stable/book/.

@mixmastamyk
Copy link

⏵ https -v 'https://doc.rust-lang.org/rust-by-example/mode-rust.js'

GET /rust-by-example/mode-rust.js HTTP/2
Host: doc.rust-lang.org
...
HTTP/2 404

@SUNx2YCH
Copy link

SUNx2YCH commented May 23, 2025

for a quick local fix, one could update book.toml:

[output.html]
-hash-files = true
+hash-files = false

introduced in #1914, cc @ehuss

didn't dig deep, probably that should be caught with linkchecker on CI

@ehuss
Copy link
Contributor

ehuss commented May 23, 2025

Yea, sorry about that. It is a known problem (rust-lang/mdBook#2700). Will try to look into a fix.

@ehuss
Copy link
Contributor

ehuss commented May 23, 2025

0.4.50 has been released which should contain a fix, and have posted an update to update the docs generation (though it will take a while for that to reach stable).

@steckes
Copy link
Author

steckes commented May 24, 2025

Great, it works again on nightly!
https://doc.rust-lang.org/nightly/rust-by-example/hello.html

@steckes steckes closed this as completed May 24, 2025
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

No branches or pull requests

4 participants