Skip to content

fix(css): support six-digit unicode ranges - #4454

Merged
joshgoebel merged 1 commit into
highlightjs:mainfrom
Baltsat:fix/css-six-digit-unicode-range
Jul 26, 2026
Merged

joshgoebel merged 1 commit into
highlightjs:mainfrom
Baltsat:fix/css-six-digit-unicode-range

Conversation

@Baltsat

@Baltsat Baltsat commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #4253 and #4254. This also supersedes the author-closed #4406 by adding the requested markup coverage and changelog entry.

Changes

  • accept the CSS Fonts limit of one to six hexadecimal digits in unicode-range
  • cover U+10FFFF, U+0-10FFFF, and U+0????? in the shared CSS markup fixture
  • document the fix in CHANGES.md

The CSS Fonts specification defines the initial range as U+0-10FFFF and permits one to six hexadecimal digits:
https://drafts.csswg.org/css-fonts/#unicode-range-desc

Before this patch, current main highlighted only U+10FFF in U+10FFFF, leaving the final F unclassified. The branch highlights each full token.

Validation

  • npm run build
  • npm run test-markup — 550 passing
  • npm run lint-languages
  • npm test — 1,583 passing, 3 pending
  • git diff --check

This change was AI-assisted; I reproduced the behavior on current main, inspected the exact diff, and ran the checks above locally.

Checklist

  • Added markup tests
  • Updated the changelog at CHANGES.md

User-Request: continue quality OSS contributions with end-to-end PRs | codex:019f971d-3815-7a81-a35c-12e2bc7316f4
Copilot AI review requested due to automatic review settings July 26, 2026 01:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown

Build Size Report

Changes to minified artifacts in /build, after gzip compression.

5 files changed

Total change -6 B

View Changes
file base pr diff
es/core.min.js 8.24 KB 8.24 KB -3 B
es/highlight.min.js 8.24 KB 8.24 KB -3 B
es/languages/css.min.js 4.43 KB 4.43 KB +1 B
highlight.min.js 8.28 KB 8.28 KB -2 B
languages/scss.min.js 4.88 KB 4.88 KB +1 B

@joshgoebel
joshgoebel merged commit 3a8314f into highlightjs:main Jul 26, 2026
18 checks passed
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

Successfully merging this pull request may close these issues.

3 participants