Skip to content

Commit f8b274e

Browse files
committed
[css mode] Fix tokenizing of empty url() token
Issue #2465
1 parent 06626c1 commit f8b274e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

mode/css/css.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ CodeMirror.defineMode("css", function(config, parserConfig) {
8484

8585
function tokenParenthesized(stream, state) {
8686
stream.next(); // Must be '('
87-
if (!stream.match(/\s*[\"\']/, false))
87+
if (!stream.match(/\s*[\"\')]/, false))
8888
state.tokenize = tokenString(")");
8989
else
9090
state.tokenize = null;

mode/css/test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,7 @@
116116
" [property src]: [atom url]([string http://blah]),",
117117
" [atom url]([string http://foo]);",
118118
"}");
119+
120+
MT("empty_url",
121+
"[def @import] [tag url]() [tag screen];");
119122
})();

0 commit comments

Comments
 (0)