@@ -405,6 +405,21 @@ var tests = [{
405405 ]
406406} , {
407407 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' ,
408423 fixture : 'url( "/demo/bg.png" /*comment*/ )' ,
409424 expected : [
410425 { type : 'function' , sourceIndex : 0 , value : 'url' , before : ' ' , after : ' ' , nodes : [
@@ -414,15 +429,15 @@ var tests = [{
414429 ] }
415430 ]
416431} , {
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 ' ,
418433 fixture : 'url( /*comment*/ /demo/bg.png )' ,
419434 expected : [
420435 { type : 'function' , sourceIndex : 0 , value : 'url' , before : ' ' , after : ' ' , nodes : [
421436 { type : 'word' , sourceIndex : 5 , value : '/*comment*/ /demo/bg.png' } ,
422437 ] }
423438 ]
424439} , {
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 ' ,
426441 fixture : 'url( /demo/bg.png /*comment*/ )' ,
427442 expected : [
428443 { type : 'function' , sourceIndex : 0 , value : 'url' , before : ' ' , after : ' ' , nodes : [
0 commit comments