Skip to content
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

Code highlighting on lints website using SCSS language a lot somehow? #14048

Closed
steffahn opened this issue Jan 20, 2025 · 0 comments · Fixed by #14038
Closed

Code highlighting on lints website using SCSS language a lot somehow? #14048

steffahn opened this issue Jan 20, 2025 · 0 comments · Fixed by #14038
Labels
A-website Area: Improving the clippy website

Comments

@steffahn
Copy link
Member

steffahn commented Jan 20, 2025

Description

Looking through the lints descriptions on https://rust-lang.github.io/rust-clippy/master/index.html I’ve noticed some inconsistent highlighting… e.g. very clearly in the Example here:

Image

Looking at the html, it seems the upper code example was highlighted as “SCSS” somehow?

Image

Searching the full page shows this happening quite a few times, i.e. in multiple places.

My best guess would be: Maybe these code examples just run on highlight.js’s language autodetection?

@y21 y21 added the A-website Area: Improving the clippy website label Jan 22, 2025
github-merge-queue bot pushed a commit that referenced this issue Feb 1, 2025
This fixes the buttons that expand/collapse all the lints in the list,
it also makes code block syntax highlighting only happen when the
specific lint enters the viewport since highlighting them all at once
was fairly heavy

There's also a few miscellaneous inline event handler removals

`script.js` and highlightjs are now loaded with `defer` so that the
download can start earlier

Also fixes #14048, we
were calling highlight on the `pre` in `<pre><code>...</code></pre>` but
highlightjs wants us to call it on the `code` element

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-website Area: Improving the clippy website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants