rust-lang / crates.io

The Rust package registry
https://crates.io
Apache License 2.0
2.93k stars 597 forks source link

no_run in language specifier in a markdown block breaks syntax highlighting #1150

Closed colindean closed 4 years ago

colindean commented 6 years ago

While reading https://crates.io/crates/digitalocean, I notice that the code blocks are not highlighted. In the HTML, I see the code element has class language-unidentified, indicating that the highlighter is working but couldn't figure out the language.

I look at the source Markdown at https://github.com/Hoverbear/digitalocean/blob/master/README.md and see that the examples are specified as rust,no_run, which @hoverbear explained to me is valid to prevent the running of the code in the example when a site allows running of examples.

I would expect the example to still be highlighted appropriately.

zeenix commented 4 years ago

My crates are bitten by the same issue: https://crates.io/crates/zbus , https://crates.io/crates/zbus_macros (same README file), etc. It really destroyed my plans for making a great first impression on our first release. :cry: