|
|
@@ -916,11 +916,15 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
async function processElement(element, stylesheetInfo, stylesheets, baseURI, options, workStyleElement) {
|
|
|
stylesheets.set(element, stylesheetInfo);
|
|
|
let stylesheetContent = await getStylesheetContent(element, baseURI, options, workStyleElement);
|
|
|
+ if (element.href && element.href.includes("style.css")) {
|
|
|
+ debugger
|
|
|
+ }
|
|
|
const match = stylesheetContent.match(/^@charset\s+"([^"]*)";/i);
|
|
|
if (match && match[1] && match[1] != options.charset) {
|
|
|
options.charset = match[1];
|
|
|
stylesheetContent = await getStylesheetContent(element, baseURI, options, workStyleElement);
|
|
|
}
|
|
|
+ if (element.href && element.href.includes("styles.css")) { }
|
|
|
let stylesheet;
|
|
|
try {
|
|
|
stylesheet = cssTree.parse(Util.removeCssComments(stylesheetContent));
|
|
|
@@ -2027,7 +2031,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
}
|
|
|
|
|
|
static removeCssComments(stylesheetContent) {
|
|
|
- return stylesheetContent.replace(/\/\*.+?\*\//g, "");
|
|
|
+ return stylesheetContent.replace(/\/\*(.|\s)+?\*\//g, "");
|
|
|
}
|
|
|
|
|
|
static wrapMediaQuery(stylesheetContent, mediaQuery) {
|