我有一张海峡前座总汇/米吉斯/马舍尔。 它现在运作良好。
I am however wondering if there is any way to improve my minimizing regex calls. Some comments are not striped from the CSS entirely, and I notice a few other hiccups here and there.
此外,考虑到我的能力,我或许能够在半数电话中这样做。
任何建议都将受到高度赞赏。
感谢。
function minimizeData( _content ) {
var content = _content;
content = content.replace( /(/*.**/)|(
|
)+| */g, );
content = content.replace( /s{2,}/g, );
content = content.replace( /(s)*:(s)*/g, : );
content = content.replace( /(s)+./g, . );
content = content.replace( /(s|
|
)*{(s|
|
)*/g, { );
content = content.replace( /(s|
|
)*}(s|
|
)*/g, } );
content = content.replace( /;(s)+/g, ; );
content = content.replace( /,(s)+/g, , );
content = content.replace( /(s)+!/g, ! );
return content;
}