From 27c0303b0d63c7e37d11efd479bd8452057f9f05 Mon Sep 17 00:00:00 2001 From: Jason Miller Date: Fri, 21 Jan 2022 13:05:14 -0500 Subject: [PATCH] Fix shorthand property parsing I believe this should fix #26. --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index 9bd80cb..76a5004 100644 --- a/src/index.js +++ b/src/index.js @@ -397,7 +397,7 @@ function processRemoteSheetRules(sheet) { } function escapePaintRules(css) { - return css.replace(/(;|,|\b)paint\s*\(\s*(['"]?)(.+?)\2\s*\)(;|,|!|\b|$)/g, '$1url(data:image/paint-$3,=)$4'); + return css.replace(/( |;|,|\b)paint\s*\(\s*(['"]?)(.+?)\2\s*\)( |;|,|!|\b|$)/g, '$1url(data:image/paint-$3,=)$4'); } let updateQueue = []; @@ -1109,4 +1109,4 @@ if (!supportsPaintWorklet) { } catch (e) { } -} \ No newline at end of file +}