aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/grunt/utils.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/grunt/utils.js b/lib/grunt/utils.js
index abc71816..0c1fd8ca 100644
--- a/lib/grunt/utils.js
+++ b/lib/grunt/utils.js
@@ -65,7 +65,7 @@ module.exports = {
var css = fs.readFileSync(file).toString();
if(minify){
css = css
- .replace(/\n/g, '')
+ .replace(/\r?\n/g, '')
.replace(/\/\*.*?\*\//g, '')
.replace(/:\s+/g, ':')
.replace(/\s*\{\s*/g, '{')
@@ -73,11 +73,11 @@ module.exports = {
.replace(/\s*\,\s*/g, ',')
.replace(/\s*\;\s*/g, ';');
}
- //espace for js
+ //escape for js
css = css
.replace(/\\/g, '\\\\')
.replace(/'/g, "\\'")
- .replace(/\n/g, '\\n');
+ .replace(/\r?\n/g, '\\n');
return "angular.element(document).find('head').append('<style type=\"text/css\">" + css + "</style>');";
}
},