Gildas 7 лет назад
Родитель
Сommit
0cdd75be23
1 измененных файлов с 1 добавлено и 5 удалено
  1. 1 5
      lib/single-file/htmlmini.js

+ 1 - 5
lib/single-file/htmlmini.js

@@ -171,11 +171,7 @@ this.htmlmini = this.htmlmini || (() => {
 				let lastTextContent;
 				while (lastTextContent != textContent) {
 					lastTextContent = textContent;
-					textContent = textContent.replace(/ +/g, " ");
-					textContent = textContent.replace(/\n+/g, "\n");
-					textContent = textContent.replace(/\t+/g, "\t");
-					textContent = textContent.replace(/\f+/g, "\f");
-					textContent = textContent.replace(/\r+/g, "\r");
+					textContent = textContent.replace(/[ \n\t\f\r]+/g, " ");
 				}
 				node.textContent = textContent;
 			}