Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
fix(Grunt): also remove \r chars when joining files
Browse files Browse the repository at this point in the history
  • Loading branch information
petebacondarwin committed Apr 16, 2013
1 parent 58ef323 commit 4652386
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/grunt/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ 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, '{')
.replace(/\s*\}\s*/g, '}')
.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>');";
}
},
Expand Down

0 comments on commit 4652386

Please sign in to comment.