瀏覽代碼

Changed \s to [\r\n] instead since \s and . may not be disjoint.

Ben 4 年之前
父節點
當前提交
48cfbd8f39
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -2293,7 +2293,7 @@ function matchImport(stylesheetContent) {
 
 function removeCssComments(stylesheetContent) {
 	try {
-		return stylesheetContent.replace(/\/\*(.|\s)*?\*\//g, "");
+		return stylesheetContent.replace(/\/\*(.|[\r\n])*?\*\//g, "");
 	} catch (error) {
 		let start, end;
 		do {