Comparing version 0.4.2 to 0.4.3
@@ -123,2 +123,8 @@ /** | ||
}); | ||
// Preserve spaces in calc expressions | ||
css = css.replace(/calc\s*\(\s*(.*?)\s*\)/g, function (m, c) { | ||
return m.replace(c, c.replace(/\s+/g, "___YUICSSMIN_SPACE_IN_CALC___")); | ||
}); | ||
css = css.replace(/\s+([!{};:>+\(\)\],])/g, '$1'); | ||
@@ -146,2 +152,5 @@ css = css.replace(/___YUICSSMIN_PSEUDOCLASSCOLON___/g, ":"); | ||
// Restore preserved spaces in calc expressions | ||
css = css.replace(/___YUICSSMIN_SPACE_IN_CALC___/g, " "); | ||
// remove unnecessary semicolons | ||
@@ -148,0 +157,0 @@ css = css.replace(/;+\}/g, "}"); |
{ | ||
"name": "cssmin", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"description": "A simple CSS minifier that uses a port of YUICompressor in JS", | ||
@@ -5,0 +5,0 @@ "main": "cssmin", |
12030
200