https://bugzilla.redhat.com/show_bug.cgi?id=745515 --- Comment #26 from gil cattaneo <puntogil@xxxxxxxxx> --- work fine also with rhino = 1.7R3, and i have intention of import also for F18 the errors seem caused by empty js file... in my system work fine yuicompressor --type js cssmin.js var YAHOO=YAHOO||{};YAHOO.compressor=YAHOO.compressor||{};YAHOO.compressor._extractDataUrls=function(i,d){var g=i.length-1,l=0,n,h,a,e,k=[],c,b,f,j=/url\(\s*(["']?)data\:/gi;while((c=j.exec(i))!==null){n=c.index+4;a=c[1];if(a.length===0){a=")"}e=false;h=j.lastIndex-1;while(e===false&&h+1<=g){h=i.indexOf(a,h+1);if((h>0)&&(i.charAt(h-1)!=="\")){e=true;if(")"!=a){h=i.indexOf(")",h)}}}k.push(i.substring(l,c.index));if(e){f=i.substring(n,h);f=f.replace(/\s+/g,"");d.push(f);b="url(___YUICSSMIN_PRESERVED_TOKEN_"+(d.length-1)+"___)";k.push(b);l=h+1}else{k.push(i.substring(c.index,j.lastIndex));l=j.lastIndex}}k.push(i.substring(l));return k.join("")};YAHOO.compressor._compressHexColors=function(d){var e=/(\=\s*?["']?)?#([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])(\}|[^0-9a-f{][^{]*?\})/gi,a,c=0,b,f=[];while((a=e.exec(d))!==null){f.push(d.substring(c,a.index));b=a[1];if(b){f.push(a[1]+"#"+(a[2]+a[3]+a[4]+a[5]+a[6]+a[7]))}else{if(a[2].toLowerCase()==a[3].toLowerCase()&&a[4].toLowerCase()==a[5].toLowerCase()&&a[6].toLowerCase()==a[7].toLowerCase()){f.push("#"+(a[3]+a[5]+a[7]).toLowerCase())}else{f.push("#"+(a[2]+a[3]+a[4]+a[5]+a[6]+a[7]).toLowerCase())}}c=e.lastIndex=e.lastIndex-a[8].length}f.push(d.substring(c));return f.join("")};YAHOO.compressor.cssmin=function(e,g){var k=0,d=0,c=0,h=0,a=[],f=[],b="",l=e.length,j="";e=this._extractDataUrls(e,a);while((k=e.indexOf("/*",k))>=0){d=e.indexOf("*/",k+2);if(d<0){d=l}b=e.slice(k+2,d);f.push(b);e=e.slice(0,k+2)+"___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_"+(f.length-1)+"___"+e.slice(d);k+=2}e=e.replace(/("([^\\"]|\\.|\\)*")|('([^\\']|\\.|\\)*')/g,function(o){var p,m,n=o.substring(0,1);o=o.slice(1,-1);if(o.indexOf("___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_")>=0){for(p=0,m=f.length;p<m;p=p+1){o=o.replace("___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_"+p+"___",f[p])}}o=o.replace(/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,"alpha(opacity=");a.push(o);return n+"___YUICSSMIN_PRESERVED_TOKEN_"+(a.length-1)+"___"+n});for(c=0,h=f.length;c<h;c=c+1){b=f[c];j="___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_"+c+"___";if(b.charAt(0)==="!"){a.push(b);e=e.replace(j,"___YUICSSMIN_PRESERVED_TOKEN_"+(a.length-1)+"___");continue}if(b.charAt(b.length-1)==="\"){a.push("\");e=e.replace(j,"___YUICSSMIN_PRESERVED_TOKEN_"+(a.length-1)+"___");c=c+1;a.push("");e=e.replace("___YUICSSMIN_PRESERVE_CANDIDATE_COMMENT_"+c+"___","___YUICSSMIN_PRESERVED_TOKEN_"+(a.length-1)+"___");continue}if(b.length===0){k=e.indexOf(j);if(k>2){if(e.charAt(k-3)===">"){a.push("");e=e.replace(j,"___YUICSSMIN_PRESERVED_TOKEN_"+(a.length-1)+"___")}}}e=e.replace("/*"+j+"*/","")}e=e.replace(/\s+/g," ");e=e.replace(/(^|\})(([^\{:])+:)+([^\{]*\{)/g,function(i){return i.replace(":","___YUICSSMIN_PSEUDOCLASSCOLON___")});e=e.replace(/\s+([!{};:>+\(\)\],])/g,"$1");e=e.replace(/___YUICSSMIN_PSEUDOCLASSCOLON___/g,":");e=e.replace(/:first-(line|letter)(\{|,)/gi,function(m,i,n){return":first-"+i.toLowerCase()+" "+n});e=e.replace(/\*\/ /g,"*/");e=e.replace(/^(.*)(@charset)( "[^"]*";)/gi,function(m,i,o,n){return o.toLowerCase()+n+i});e=e.replace(/^((\s*)(@charset)( [^;]+;\s*))+/gi,function(m,i,p,o,n){return p+o.toLowerCase()+n});e=e.replace(/\band\(/gi,"and (");e=e.replace(/@(font-face|import|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?keyframe|media|page|namespace)/gi,function(m,i){return"@"+i.toLowerCase()});e=e.replace(/:(active|after|before|checked|disabled|empty|enabled|first-(?:child|of-type)|focus|hover|last-(?:child|of-type)|link|only-(?:child|of-type)|root|:selection|target|visited)/gi,function(m,i){return":"+i.toLowerCase()});e=e.replace(/:(lang|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|(?:-(?:moz|webkit)-)?any)\(/gi,function(m,i){return":"+i.toLowerCase()+"("});e=e.replace(/([:,\( ]\s*)(attr|color-stop|from|rgba|to|url|(?:-(?:atsc|khtml|moz|ms|o|wap|webkit)-)?(?:calc|max|min|(?:repeating-)?(?:linear|radial)-gradient)|-webkit-gradient)/gi,function(m,i,n){return i+n.toLowerCase()});e=e.replace(/([!{}:;>+\(\[,])\s+/g,"$1");e=e.replace(/;+\}/g,"}");e=e.replace(/(^|[^0-9])(?:0?\.)?0(?:px|em|%|in|cm|mm|pc|pt|ex|deg|g?rad|m?s|k?hz)/gi,"$10");e=e.replace(/:0 0 0 0(;|\})/g,":0$1");e=e.replace(/:0 0 0(;|\})/g,":0$1");e=e.replace(/:0 0(;|\})/g,":0$1");e=e.replace(/(background-position|transform-origin|webkit-transform-origin|moz-transform-origin|o-transform-origin|ms-transform-origin):0(;|\})/gi,function(m,n,i){return n.toLowerCase()+":0 0"+i});e=e.replace(/(:|\s)0+\.(\d+)/g,"$1.$2");e=e.replace(/rgb\s*\(\s*([0-9,\s]+)\s*\)/gi,function(){var m,n=arguments[1].split(",");for(m=0;m<n.length;m=m+1){n[m]=parseInt(n[m],10).toString(16);if(n[m].length===1){n[m]="0"+n[m]}}return"#"+n.join("")});e=this._compressHexColors(e);e=e.replace(/(:|\s)(#f00)(;|})/g,"$1red$3");e=e.replace(/(:|\s)(#000080)(;|})/g,"$1navy$3");e=e.replace(/(:|\s)(#808080)(;|})/g,"$1gray$3");e=e.replace(/(:|\s)(#808000)(;|})/g,"$1olive$3");e=e.replace(/(:|\s)(#800080)(;|})/g,"$1purple$3");e=e.replace(/(:|\s)(#c0c0c0)(;|})/g,"$1silver$3");e=e.replace(/(:|\s)(#008080)(;|})/g,"$1teal$3");e=e.replace(/(:|\s)(#ffa500)(;|})/g,"$1orange$3");e=e.replace(/(:|\s)(#800000)(;|})/g,"$1maroon$3");e=e.replace(/(border|border-top|border-right|border-bottom|border-left|outline|background):none(;|\})/gi,function(m,n,i){return n.toLowerCase()+":0"+i});e=e.replace(/progid:DXImageTransform\.Microsoft\.Alpha\(Opacity=/gi,"alpha(opacity=");e=e.replace(/[^\};\{\/]+\{\}/g,"");if(g>=0){k=0;c=0;while(c<e.length){c=c+1;if(e[c-1]==="}"&&c-k>g){e=e.slice(0,c)+" "+e.slice(c);k=c}}}e=e.replace(/;;+/g,";");for(c=0,h=a.length;c<h;c=c+1){e=e.replace("___YUICSSMIN_PRESERVED_TOKEN_"+c+"___",a[c])}e=e.replace(/^\s+|\s+$/g,"");return e}; also tested with yuicompressor maven plugin ... -- You are receiving this mail because: You are on the CC list for the bug. Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=JtSU75ioJy&a=cc_unsubscribe _______________________________________________ package-review mailing list package-review@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/package-review