소스 검색

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

Gildas 5 년 전
부모
커밋
939c324ff0
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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
 			}