|
@@ -2020,15 +2020,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static removeCssComments(stylesheetContent) {
|
|
static removeCssComments(stylesheetContent) {
|
|
|
- let start, end;
|
|
|
|
|
- do {
|
|
|
|
|
- start = stylesheetContent.indexOf("/*");
|
|
|
|
|
- end = stylesheetContent.indexOf("*/", start + 2);
|
|
|
|
|
- if (start != -1 && end != -1) {
|
|
|
|
|
- stylesheetContent = stylesheetContent.substring(0, start) + stylesheetContent.substr(end + 2);
|
|
|
|
|
- }
|
|
|
|
|
- } while (start != -1 && end != -1);
|
|
|
|
|
- return stylesheetContent;
|
|
|
|
|
|
|
+ return stylesheetContent.replace(/\/\*.+?\*\//g, "");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
static wrapMediaQuery(stylesheetContent, mediaQuery) {
|
|
static wrapMediaQuery(stylesheetContent, mediaQuery) {
|