diff --git a/lib/templates.js b/lib/templates.js
index <HASH>..<HASH> 100644
--- a/lib/templates.js
+++ b/lib/templates.js
@@ -14,7 +14,7 @@
 		nestedConditionals: /(?!^)<!-- IF([\s\S]*?)ENDIF[ a-zA-Z0-9\._:]*-->(?!$)/gi,
 		conditionalBlock: /[\r\n?\n]*?<!-- ELSE -->[\r\n?\n]*?/,
 		conditionalHelper: /IF function.([\S]*)/gi,
-		removeTabspace: /^[\r\n?|\n|\t]*?|[\r\n?|\n|\t]*?$/g,
+		removeTabspace: /^\t*?|^\r\n?\t*?|\t?$|\r\n?\t*?$/g,
 		removeWhitespace: /(^[\r\n?|\n]*)|([\r\n\t]*$)/g,
 		cleanupEmptyLoops: /\s*<!-- BEGIN([\s\S]*?)END ([\s\S]*?)-->/gi,
 		getUndefinedKeys: /<!-- IF[\s!]*([\s\S]*?)[\s]*-->/gi,
fixed removeTabspace on both windows and linux line endings