single-file-core 1.6.26 → 1.6.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/index.js +2 -1
- package/core/util.js +1 -1
- package/package.json +1 -1
package/core/index.js
CHANGED
|
@@ -1759,7 +1759,8 @@ class Processor {
|
|
|
1759
1759
|
this.doc.head.appendChild(styleElement);
|
|
1760
1760
|
}
|
|
1761
1761
|
let stylesheetContent = "";
|
|
1762
|
-
cssVariables.
|
|
1762
|
+
const variables = Array.from(cssVariables.entries()).sort(([firstIndex], [secondIndex]) => firstIndex - secondIndex);
|
|
1763
|
+
variables.forEach(([indexResource, { content, url }]) => {
|
|
1763
1764
|
cssVariables.delete(indexResource);
|
|
1764
1765
|
if (stylesheetContent) {
|
|
1765
1766
|
stylesheetContent += ";";
|
package/core/util.js
CHANGED
|
@@ -489,7 +489,7 @@ async function getFetchResponse(resourceURL, options, data, charset, contentType
|
|
|
489
489
|
charset = "utf-8";
|
|
490
490
|
data = new TextDecoder(charset).decode(data);
|
|
491
491
|
}
|
|
492
|
-
data = data.replace(
|
|
492
|
+
data = data.replace(/^\ufeff/, "");
|
|
493
493
|
}
|
|
494
494
|
} else if (options.inline) {
|
|
495
495
|
data = options.asBinary ? helper.EMPTY_RESOURCE : "";
|