codemirror / dev

Development repository for the CodeMirror editor project
https://codemirror.net/
Other
5.96k stars 377 forks source link

A blank url() in CSS causes highlighting errors. #1402

Closed gui-ying233 closed 4 months ago

gui-ying233 commented 4 months ago

Describe the issue

* {
    background-image: url();
    color: #FF0;
}

image

See also: https://issues.chromium.org/issues/348675992 And in Chinese: https://gui-ying233.github.io/Nest/CodeMirror%20url()%20Bug

Browser and platform

CM6 (2.14.7), Chromium 126, 127, 128 in Linux Mac Windows…

Reproduction link

No response

marijnh commented 4 months ago

Attached patch should help.