Skip to content

fix: parse unquoted url() values containing semicolons#554

Merged
remarkablemark merged 1 commit into
masterfrom
fix/parser
Jul 6, 2026
Merged

fix: parse unquoted url() values containing semicolons#554
remarkablemark merged 1 commit into
masterfrom
fix/parser

Conversation

@remarkablemark

Copy link
Copy Markdown
Owner

What is the motivation for this pull request?

Bug fix: the parser failed to parse unquoted url() values that contain semicolons, such as data URIs (e.g. url(data:image/png; base64,...)).

What is the current behavior?

Parsing background: url(data:image/png; base64,...) throws property missing ':' because VALUE_REGEX stops matching at the ; inside the unquoted url(), treating the remainder as a new property declaration.

What is the new behavior?

VALUE_REGEX now includes a url(...) alternative that consumes the entire unquoted url() token (including any ; inside it) before falling back to character-by-character matching.

Checklist:

Comment thread index.js Fixed
Comment thread index.js Fixed
@mergify

mergify Bot commented Jul 6, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@remarkablemark remarkablemark self-assigned this Jul 6, 2026
@remarkablemark remarkablemark added the bug Something isn't working label Jul 6, 2026
@codecov

codecov Bot commented Jul 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (766bb9c) to head (a7b60ad).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #554   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          100       100           
  Branches        17        17           
=========================================
  Hits           100       100           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

- Extend `VALUE_REGEX` to match `url(...)` as a single token
- Handle unquoted data URIs like `url(data:image/png; base64,...)`
- Add test case for unquoted data URI with semicolon in `url()`
@remarkablemark remarkablemark changed the title fix: parse unquoted url() values containing semicolons fix: parse unquoted url() values containing semicolons Jul 6, 2026
@remarkablemark remarkablemark merged commit 6097b05 into master Jul 6, 2026
13 checks passed
@remarkablemark remarkablemark deleted the fix/parser branch July 6, 2026 04:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants