Skip to content

Commit

Permalink
Fixed issue where CSS comments containing a comma would be prefixed i…
Browse files Browse the repository at this point in the history
…ncorrectly, which could cause syntax errors in the CSS.
  • Loading branch information
barthc authored Mar 21, 2024
1 parent 572e45b commit 99d43b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class-gwiz-gf-code-chest.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ public function prefix_css_selectors( $css, $prefix ) {
* Find all CSS selectors, but ignore all `@` rules such as @font-face, @media, etc. as they are
* defined globally and not can't be scoped to a certion "parent" selector.
*/
return preg_replace_callback('/^\s*(?!@)([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/m', function( $matches ) use ( $prefix ) {
return preg_replace_callback('/^\s*(?!@)([^\r\n,{}\/]+)(,(?=[^}]*{)|\s*{)/m', function( $matches ) use ( $prefix ) {
return $prefix . ' ' . trim( $matches[1] ) . $matches[2];
}, $css);
}
Expand Down

0 comments on commit 99d43b9

Please sign in to comment.