@@ -405,6 +405,21 @@ var tests = [{
405
405
]
406
406
} , {
407
407
message : 'should parse comments inside functions' ,
408
+ fixture : 'rgba( 0, 55/55, 0/*,.5*/ )' ,
409
+ expected : [
410
+ { type : 'function' , sourceIndex : 0 , value : 'rgba' , before : ' ' , after : ' ' , nodes : [
411
+ { type : 'word' , sourceIndex : 6 , value : '0' } ,
412
+ { type : 'div' , sourceIndex : 7 , value : ',' , before :'' , after : ' ' } ,
413
+ { type : 'word' , sourceIndex : 9 , value : '55' } ,
414
+ { type : 'div' , sourceIndex : 11 , value : '/' , before :'' , after : '' } ,
415
+ { type : 'word' , sourceIndex : 12 , value : '55' } ,
416
+ { type : 'div' , sourceIndex : 14 , value : ',' , before :'' , after : ' ' } ,
417
+ { type : 'word' , sourceIndex : 16 , value : '0' } ,
418
+ { type : 'comment' , sourceIndex : 17 , value : ',.5' }
419
+ ] }
420
+ ]
421
+ } , {
422
+ message : 'should parse comments at the end of url functions with quoted first argument' ,
408
423
fixture : 'url( "/demo/bg.png" /*comment*/ )' ,
409
424
expected : [
410
425
{ type : 'function' , sourceIndex : 0 , value : 'url' , before : ' ' , after : ' ' , nodes : [
@@ -414,15 +429,15 @@ var tests = [{
414
429
] }
415
430
]
416
431
} , {
417
- message : 'should parse comments at the start of url function' ,
432
+ message : 'should not parse comments at the start of url function with unquoted first argument ' ,
418
433
fixture : 'url( /*comment*/ /demo/bg.png )' ,
419
434
expected : [
420
435
{ type : 'function' , sourceIndex : 0 , value : 'url' , before : ' ' , after : ' ' , nodes : [
421
436
{ type : 'word' , sourceIndex : 5 , value : '/*comment*/ /demo/bg.png' } ,
422
437
] }
423
438
]
424
439
} , {
425
- message : 'should not parse comments in the end of url function' ,
440
+ message : 'should not parse comments at the end of url function with unquoted first argument ' ,
426
441
fixture : 'url( /demo/bg.png /*comment*/ )' ,
427
442
expected : [
428
443
{ type : 'function' , sourceIndex : 0 , value : 'url' , before : ' ' , after : ' ' , nodes : [
0 commit comments