Skip to content

fix(parser): don't report an error for @color-profile device-cmyk#120

Merged
Boshen merged 1 commit into
mainfrom
fix/color-profile-device-cmyk
Jul 12, 2026
Merged

fix(parser): don't report an error for @color-profile device-cmyk#120
Boshen merged 1 commit into
mainfrom
fix/color-profile-device-cmyk

Conversation

@Boshen

@Boshen Boshen commented Jul 12, 2026

Copy link
Copy Markdown
Member

Fixes OXC-COLOR-001 from #109: CSS Color 5 allows device-cmyk as a predefined @color-profile name (@color-profile [ <dashed-ident> | device-cmyk ]), but the prelude parser routed through parse_dashed_ident, which pushed its recoverable dashed identifier is expected error before the device-cmyk match ever ran — so the AST was right but the parse wasn't clean.

The prelude now checks device-cmyk (ASCII case-insensitive) before applying the dashed-ident requirement; other non-dashed names still report the recoverable error (covered by a new recoverable-fixture snapshot).

Full test suite passes and conformance snapshots are unchanged.

Fuzzer finding OXC-COLOR-001 from #109: CSS Color 5 allows
`device-cmyk` as a predefined @color-profile name, but the prelude
parser routed through parse_dashed_ident, which pushed its recoverable
`dashed identifier is expected` error before the device-cmyk match.
Other non-dashed names still report the error.
@codspeed-hq

codspeed-hq Bot commented Jul 12, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks
⏩ 1 skipped benchmark1


Comparing fix/color-profile-device-cmyk (9808080) with main (8bd2eed)

Open in CodSpeed

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@Boshen Boshen merged commit e73424d into main Jul 12, 2026
7 checks passed
@Boshen Boshen deleted the fix/color-profile-device-cmyk branch July 12, 2026 10:55
@oxc-guard oxc-guard Bot mentioned this pull request Jul 12, 2026
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.

1 participant