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 CHANGED
@@ -1759,7 +1759,8 @@ class Processor {
1759
1759
  this.doc.head.appendChild(styleElement);
1760
1760
  }
1761
1761
  let stylesheetContent = "";
1762
- cssVariables.forEach(({ content, url }, indexResource) => {
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(/\ufeff/gi, "");
492
+ data = data.replace(/^\ufeff/, "");
493
493
  }
494
494
  } else if (options.inline) {
495
495
  data = options.asBinary ? helper.EMPTY_RESOURCE : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.6.26",
3
+ "version": "1.6.27",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",