Browse Source

disable temporarly variable substitution (issues with fonts)

Gildas 7 năm trước cách đây
mục cha
commit
e0fcaf1277
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      lib/single-file/single-file-core.js

+ 4 - 0
lib/single-file/single-file-core.js

@@ -885,14 +885,18 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 				if (resourceURL && resourceURL != baseURI && DomUtil.testValidPath(resourceURL) && stylesheetContent.includes(urlFunction)) {
 					const dataURI = await batchRequest.addURL(resourceURL);
 					const functions = stylesheetContent.match(DomUtil.getRegExp(urlFunction));
+					/*
 					if (!inline && options.compressCSS && functions.length > 1) {
 						const variableName = "--single-file-" + indexStyle + "-" + indexVariable;
 						stylesheetContent = variableName + ":url(\"" + dataURI + "\")" + (indexVariable ? ";" : "}") + stylesheetContent;
 						stylesheetContent = stylesheetContent.replace(DomUtil.getRegExp(urlFunction), "var(" + variableName + ")");
 						indexVariable++;
 					} else {
+						*/
 						stylesheetContent = stylesheetContent.replace(DomUtil.getRegExp(urlFunction), urlFunction.replace(originalResourceURL, dataURI));
+						/*
 					}
+					*/
 				}
 			}));
 			if (indexVariable) {