|
|
@@ -1143,8 +1143,9 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
if (DomUtil.testValidURL(resourceURL, baseURI, options.url)) {
|
|
|
const downloadOptions = { asDataURI: false, maxResourceSize: options.maxResourceSize, maxResourceSizeEnabled: options.maxResourceSizeEnabled, validateTextContentType: true };
|
|
|
let importedStylesheetContent = await Download.getContent(resourceURL, downloadOptions);
|
|
|
+ importedStylesheetContent = DomUtil.removeCssComments(importedStylesheetContent);
|
|
|
if (options.compressCSS) {
|
|
|
- importedStylesheetContent = DOM.compressCSS(DomUtil.removeCssComments(importedStylesheetContent));
|
|
|
+ importedStylesheetContent = DOM.compressCSS(importedStylesheetContent);
|
|
|
}
|
|
|
importedStylesheetContent = DomUtil.wrapMediaQuery(importedStylesheetContent, match.media);
|
|
|
if (stylesheetContent.includes(cssImport)) {
|
|
|
@@ -1187,8 +1188,9 @@ this.SingleFileCore = this.SingleFileCore || (() => {
|
|
|
if (resourceURL && resourceURL != baseURI && resourceURL != ABOUT_BLANK_URI) {
|
|
|
const downloadOptions = { asDataURI: false, maxResourceSize: options.maxResourceSize, maxResourceSizeEnabled: options.maxResourceSizeEnabled, charSet: options.charSet };
|
|
|
let stylesheetContent = await Download.getContent(resourceURL, downloadOptions);
|
|
|
+ stylesheetContent = DomUtil.removeCssComments(stylesheetContent);
|
|
|
if (options.compressCSS) {
|
|
|
- stylesheetContent = DOM.compressCSS(DomUtil.removeCssComments(stylesheetContent));
|
|
|
+ stylesheetContent = DOM.compressCSS(stylesheetContent);
|
|
|
}
|
|
|
stylesheetContent = await DomProcessorHelper.resolveImportURLs(stylesheetContent, resourceURL, options);
|
|
|
return stylesheetContent;
|