diff --git a/lib/unbuild.js b/lib/unbuild.js index d81c3389..57c18a16 100644 --- a/lib/unbuild.js +++ b/lib/unbuild.js @@ -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(){ @@ -95,4 +95,4 @@ var undent = function(code, n){ write(file, undent(code)); recurse(); }()); -}()); \ No newline at end of file +}());