1
0
Эх сурвалжийг харах

fixed SingleFile comment removal issue

Gildas 7 жил өмнө
parent
commit
91c82b500d

+ 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");
 		}
 	}