浏览代码

remove comments before processing the CSS file

Gildas 7 年之前
父节点
当前提交
461cde1854
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/single-file/single-file-core.js

+ 1 - 1
lib/single-file/single-file-core.js

@@ -1187,10 +1187,10 @@ 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 = await DomProcessorHelper.resolveImportURLs(stylesheetContent, resourceURL, options);
 				if (options.compressCSS) {
 					stylesheetContent = DOM.compressCSS(DomUtil.removeCssComments(stylesheetContent));
 				}
+				stylesheetContent = await DomProcessorHelper.resolveImportURLs(stylesheetContent, resourceURL, options);
 				return stylesheetContent;
 			}
 		}