Преглед изворни кода

added include-BOM option

Former-commit-id: 06b99e66cfc24fbaa280c38f6ab51f44bc7f5ad1
= пре 6 година
родитељ
комит
efa51e6467
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      cli/single-file

+ 5 - 1
cli/single-file

@@ -68,7 +68,8 @@ const args = require("yargs")
 		"remove-alternative-images": true,
 		"save-raw-page": false,
 		"web-driver-executable-path": "",
-		"user-script-enabled": true
+		"user-script-enabled": true,
+		"include-BOM": false
 	})
 	.options("back-end", { description: "Back-end to use" })
 	.choices("back-end", ["jsdom", "puppeteer", "webdriver-chromium", "webdriver-gecko", "puppeteer-firefox"])
@@ -105,6 +106,8 @@ const args = require("yargs")
 	.string("filename-template")
 	.options("group-duplicate-images", { description: "Group duplicate images into CSS custom properties" })
 	.boolean("group-duplicate-images")
+	.options("include-BOM", { description: "Include the UTF-8 BOM into the HTML page" })
+	.boolean("include-BOM")
 	.options("include-infobar", { description: "Include the infobar" })
 	.boolean("include-infobar")
 	.options("load-deferred-images", { description: "Load deferred (a.k.a. lazy-loaded) images (puppeteer, puppeteer-firefox, webdriver-gecko, webdriver-chromium)" })
@@ -161,6 +164,7 @@ const backEnds = {
 };
 args.compressCSS = args.compressCss;
 args.compressHTML = args.compressHtml;
+args.includeBOM = args.includeBom;
 if (args.url && !/^(https?|file):\/\//.test(args.url)) {
 	args.url = fileUrl(args.url);
 }