Skip to content

Commit

Permalink
\r\n was incorrectly getting replaced with \r, which mangled things
Browse files Browse the repository at this point in the history
  • Loading branch information
allain committed Oct 5, 2016
1 parent 18dc2f2 commit 81a48ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/unbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@ var path = function(){
}

var undent = function(code, n){
var regex = /\n\t\t/ig;
var regex = /\n\t\t/g;
if(1 === n){
regex = /\n\t/ig;
regex = /\n\t/g;
}
return code.replace(regex, '');
return code.replace(regex, '\n');
}

;(function(){
Expand All @@ -95,4 +95,4 @@ var undent = function(code, n){
write(file, undent(code));
recurse();
}());
}());
}());

0 comments on commit 81a48ff

Please sign in to comment.