File tree 2 files changed +7
-0
lines changed
2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,10 @@ var parser = new Parser({
35
35
source : {
36
36
"/\\*" : "comment" ,
37
37
38
+ // strings
39
+ '"([^\\\\"]|\\\\.)*"' : true ,
40
+ "'([^\\\\']|\\\\.)*'" : true ,
41
+
38
42
// imports
39
43
'@\\s*import\\s+"([^"]*)"\\s*([^;\\n]*);' : importMatch ,
40
44
"@\\s*import\\s+'([^'']*)'\\s*([^;\\n]*);" : importMatch ,
Original file line number Diff line number Diff line change @@ -143,6 +143,9 @@ describe("url", function() {
143
143
test ( "media query" , "@media (min-width: 500px) { body { background: url(image.png); } }" , [
144
144
[ 1 , "@media (min-width: 500px) { body { background: url({./image.png}); } }" , "" ]
145
145
] ) ;
146
+ test ( "url in string" , "a { content: \"do not use url(path)\"; } b { content: 'do not \"use\" url(path)'; }" , [
147
+ [ 1 , "a { content: \"do not use url(path)\"; } b { content: 'do not \"use\" url(path)'; }" , "" ]
148
+ ] ) ;
146
149
test ( "locals" , ".local[className] { background: red; }\n#local[someId] { background: green; }\n" +
147
150
".local[className] .local[subClass] { color: green; }\n#local[someId] .local[subClass] { color: blue; }" , function ( ) { var r = [
148
151
[ 1 , "._23_aKvs-b8bW2Vg3fwHozO { background: red; }\n#_1j3LM6lKkKzRIt19ImYVnD { background: green; }\n" +
You can’t perform that action at this time.
0 commit comments