Przeglądaj źródła

don't replace new lines with whitespaces

Gildas 7 lat temu
rodzic
commit
6481b6d1c5
1 zmienionych plików z 1 dodań i 1 usunięć
  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);
 				noWhitespace = element && noWhitespaceCollapse(element);
 			}
 			}
 			if ((!element || noWhitespace) && textContent.length > 1) {
 			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");
 			}
 			}
 		}
 		}
 	}
 	}