Răsfoiți Sursa

don't replace new lines with whitespaces

Gildas 7 ani în urmă
părinte
comite
6481b6d1c5
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  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");
 			}
 		}
 	}