diff options
| author | Pete Bacon Darwin | 2013-04-16 12:13:55 +0100 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-04-16 12:13:55 +0100 |
| commit | 465238613b5b849bf833bdc71d3b42f15dc0e19b (patch) | |
| tree | 5ff9db603c644cd6dc0c640e1beb97548ea6e4ff | |
| parent | 58ef32308f45141c8f7f7cc32a6156cd328ba692 (diff) | |
| download | angular.js-465238613b5b849bf833bdc71d3b42f15dc0e19b.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>');"; } }, |
