From 81a48ff272e7bea6756cc37fa36388446323d3e2 Mon Sep 17 00:00:00 2001 From: Allain Lalonde Date: Wed, 5 Oct 2016 15:43:37 -0400 Subject: [PATCH] \r\n was incorrectly getting replaced with \r, which mangled things --- lib/unbuild.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/unbuild.js b/lib/unbuild.js index d81c33892..57c18a160 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 +}());