From c07e9536d6d8adb72a38b77829ca6d60acc0f06d Mon Sep 17 00:00:00 2001 From: howel52 Date: Mon, 24 Aug 2020 21:40:45 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20regex=20syntax=20(#889)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sandbox/patchers/css.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sandbox/patchers/css.ts b/src/sandbox/patchers/css.ts index b5a9480..5b93c86 100644 --- a/src/sandbox/patchers/css.ts +++ b/src/sandbox/patchers/css.ts @@ -135,7 +135,7 @@ class ScopedCSS { } // handle grouping selector, a,span,p,div { ... } - cssText = cssText.replace(/^[^]+{/, selectors => + cssText = cssText.replace(/^[\s\S]+{/, selectors => selectors.replace(/(^|,\n?)([^,]+)/g, (item, p, s) => { // handle div,body,span { ... } if (rootSelectorRE.test(item)) {