File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 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({
3535 source : {
3636 "/\\*" : "comment" ,
3737
38+ // strings
39+ '"([^\\\\"]|\\\\.)*"' : true ,
40+ "'([^\\\\']|\\\\.)*'" : true ,
41+
3842 // imports
3943 '@\\s*import\\s+"([^"]*)"\\s*([^;\\n]*);' : importMatch ,
4044 "@\\s*import\\s+'([^'']*)'\\s*([^;\\n]*);" : importMatch ,
Original file line number Diff line number Diff line change @@ -143,6 +143,9 @@ describe("url", function() {
143143 test ( "media query" , "@media (min-width: 500px) { body { background: url(image.png); } }" , [
144144 [ 1 , "@media (min-width: 500px) { body { background: url({./image.png}); } }" , "" ]
145145 ] ) ;
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+ ] ) ;
146149 test ( "locals" , ".local[className] { background: red; }\n#local[someId] { background: green; }\n" +
147150 ".local[className] .local[subClass] { color: green; }\n#local[someId] .local[subClass] { color: blue; }" , function ( ) { var r = [
148151 [ 1 , "._23_aKvs-b8bW2Vg3fwHozO { background: red; }\n#_1j3LM6lKkKzRIt19ImYVnD { background: green; }\n" +
You can’t perform that action at this time.
0 commit comments