Просмотр исходного кода

don't replace new lines with whitespaces

Gildas 7 лет назад
Родитель
Сommit
6481b6d1c5
1 измененных файлов с 1 добавлено и 1 удалено
  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");
 			}
 		}
 	}