|
|
@@ -41,7 +41,6 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
|
|
|
const REGEXP_FONT_FORMAT_VALUE = /format\((.*?)\)\s*,?$/;
|
|
|
const REGEXP_FONT_SRC = /(.*?)\s*,?$/;
|
|
|
const EMPTY_URL_SOURCE = /^url\(["']?data:[^,]*,?["']?\)/;
|
|
|
- const TEXT_CONTENT_URL_SOURCE = /^url\(["']?data:text\//;
|
|
|
const LOCAL_SOURCE = "local(";
|
|
|
const MEDIA_ALL = "all";
|
|
|
const FONT_WEIGHTS = {
|
|
|
@@ -213,7 +212,7 @@ this.singlefile.lib.modules.fontsAltMinifier = this.singlefile.lib.modules.fonts
|
|
|
source.valid = true;
|
|
|
}
|
|
|
}));
|
|
|
- const findSource = (fontFormat, testValidity) => fontInfo.find(source => !source.src.match(EMPTY_URL_SOURCE) && !source.src.match(TEXT_CONTENT_URL_SOURCE) && source.format == fontFormat && (!testValidity || source.valid));
|
|
|
+ const findSource = (fontFormat, testValidity) => fontInfo.find(source => !source.src.match(EMPTY_URL_SOURCE) && source.format == fontFormat && (!testValidity || source.valid));
|
|
|
const filterSource = fontSource => fontInfo.filter(source => source == fontSource || source.src.startsWith(LOCAL_SOURCE));
|
|
|
stats.fonts.processed += fontInfo.length;
|
|
|
stats.fonts.discarded += fontInfo.length;
|