rustdoc does not consistently apply syntax highlighting to the item declaration #117555
Labels
A-rustdoc-ui
Area: Rustdoc UI (generated HTML)
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
There doesn't seem to be keyword or comment highlighting for the first snippet on rustdoc pages.
https://doc.rust-lang.org/std/path/struct.PathBuf.html
https://doc.rust-lang.org/std/default/trait.Default.html (there is some highlighting here, but less than other snippets)
By contrast, other snippets seem to be fine, e.g. https://doc.rust-lang.org/std/vec/struct.Vec.html#examples has keyword and comment highlighting:
I searched for rustdoc syntax highlighting issues, but I couldn't find anything relevant. #75981 notes that rustdoc is using the lexer to highlight, but I'd expect that to handle at least comments correctly. This issue seems to have existed for a while, e.g. #103050 shows the same missing comment highlighting.
The text was updated successfully, but these errors were encountered: