diff options
| author | Pete Bacon Darwin | 2013-04-16 12:13:55 +0100 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-04-16 13:14:09 +0100 |
| commit | 0893e83c92108a057fff48a316b8a51dfec735ce (patch) | |
| tree | 3d3750923b53ecc4fdc5f36011063cfcb5aeaaba | |
| parent | ef334d0070754a40d9330ab496bd80587de2ccc3 (diff) | |
| download | angular.js-0893e83c92108a057fff48a316b8a51dfec735ce.tar.bz2 | |
fix(Grunt): also remove \r chars when joining files
| -rw-r--r-- | lib/grunt/utils.js | 6 |
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>');"; } }, |
