Explorar el Código

fixed SingleFile comment removal issue

Gildas hace 7 años
padre
commit
91c82b500d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lib/single-file/htmlmini.js

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

@@ -207,7 +207,7 @@ this.htmlmini = this.htmlmini || (() => {
 	}
 
 	function removeComments(node) {
-		if (node.nodeType == Node.COMMENT_NODE) {
+		if (node.nodeType == Node.COMMENT_NODE && !node.textContent.includes("SingleFile")) {
 			return !node.textContent.toLowerCase().trim().startsWith("[if");
 		}
 	}