highlight.js: Add missing overrides, update version, and run at build time #4627
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes in this PR:
language-*
orno-highlight
classes to code elements inside pre elements where they were missing, to provide stability across highlight.js upgrades in the event of changes to auto-detection logic./techniques/css/C45.html missing "language-*" or "no-highlight" class on <pre><code> starting with <!DOCTYPE html>\n<html lang="en...
highlight.js
at build time and including it as an npm dependencyhighlight.min.js
bundle taking up more space in the repo on each updateBefore switching from client-side to build-time, I verified (using the script I'd posted in #4611) that updating the bundle does not cause any syntax highlighting changes, other than adding it for the previously-missing languages.
I also performed screenshot diffs and have verified that the only changes caused by the update are fixes to syntax highlighting (primarily in terms of recognized CSS property names).
I performed screenshot diffs again after switching to build-time highlight.js, and there were only two diffs, in examples that specifically intended to include
<span lang="...">
elements inside of<pre><code>
. These have been adjusted to applylang
to thepre
tag instead.Note: The failure on the Check PR files check is an extremely rare false positive because I had updated it to consider
script
normative, but technically onlyscript/wcag.js
is involved in TR space;script/highlight.min.js
is not. This should never be an issue again, since I'm removinghighlight.min.js
.