Browse Source

don't replace new lines with whitespaces

Gildas 7 years ago
parent
commit
6481b6d1c5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/single-file/html-minifier.js

+ 1 - 1
lib/single-file/html-minifier.js

@@ -199,7 +199,7 @@ this.htmlmini = this.htmlmini || (() => {
 				noWhitespace = element && noWhitespaceCollapse(element);
 			}
 			if ((!element || noWhitespace) && textContent.length > 1) {
-				node.textContent = textContent.replace(REGEXP_WHITESPACE, getWhiteSpace(node)).replace(REGEXP_NEWLINE, getWhiteSpace(node));
+				node.textContent = textContent.replace(REGEXP_WHITESPACE, getWhiteSpace(node)).replace(REGEXP_NEWLINE, "\n");
 			}
 		}
 	}