Browse Source

ignore font src ending with "\9" (IE hack)

Former-commit-id: 939c324ff098b635c03d2bbddfa48e6ded2312e2
Gildas 5 năm trước cách đây
mục cha
commit
fd418ac8ce
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      lib/single-file/modules/css-fonts-alt-minifier.js

+ 2 - 2
lib/single-file/modules/css-fonts-alt-minifier.js

@@ -273,11 +273,11 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
 		const cssTree = singlefile.lib.vendor.cssTree;
 		let property;
 		if (ruleData.block.children) {
-			property = ruleData.block.children.filter(node => node.property == propertyName).tail;
+			property = ruleData.block.children.filter(node => node.property == propertyName && !cssTree.generate(node.value).match(/\\9$/)).tail;
 		}
 		if (property) {
 			try {
-				return cssTree.generate(property.data.value).replace(/\\9$/, "");
+				return cssTree.generate(property.data.value);
 			} catch (error) {
 				// ignored
 			}