Skip to content

Commit

Permalink
Remove redundant regexp symbol
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderby committed May 10, 2024
1 parent 8e8fa57 commit 26419a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inject/dynamic-theme/css-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function handleEmptyShorthand(shorthand: string, style: CSSStyleDeclaration, ite
let escapedSelector = escapeRegExpSpecialChars(parentRule.selectorText);
escapedSelector = escapedSelector.replaceAll(/\s+/g, '\\s*'); // Space count can differ
escapedSelector = escapedSelector.replaceAll(/::/g, '::?'); // ::before can be :before
const regexp = new RegExp(`${escapedSelector}\\s*{[^}}]*${shorthand}:\\s*([^;}]+)`);
const regexp = new RegExp(`${escapedSelector}\\s*{[^}]*${shorthand}:\\s*([^;}]+)`);
const match = sourceCSSText.match(regexp);
if (match) {
iterate(shorthand, match[1]);
Expand Down

0 comments on commit 26419a0

Please sign in to comment.