Commit 3f456ac
committed
Block Style Variations: Simplify block style variation selector regex
The existing regex's first capture group is effectively dead. It only matched a literal `:(...)`, which isn't valid selector syntax (functional pseudo-classes like `:is()` and `:where()` always have a name between the colon and the parenthesis), so `$matches[1]` is always empty.
The second group did all the work, so dropping the dead group gives identical output and is much easier to understand.
Props aaronrobertshaw, andrewserong, ramonopoly, wildworks.
Fixes #65588.
git-svn-id: https://develop.svn.wordpress.org/trunk@62700 602fd350-edb4-49c9-b593-d223f7449a821 parent eb88149 commit 3f456ac
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5662 | 5662 | | |
5663 | 5663 | | |
5664 | 5664 | | |
| 5665 | + | |
| 5666 | + | |
| 5667 | + | |
| 5668 | + | |
| 5669 | + | |
| 5670 | + | |
| 5671 | + | |
| 5672 | + | |
| 5673 | + | |
| 5674 | + | |
| 5675 | + | |
5665 | 5676 | | |
5666 | 5677 | | |
5667 | | - | |
| 5678 | + | |
5668 | 5679 | | |
5669 | | - | |
| 5680 | + | |
5670 | 5681 | | |
5671 | 5682 | | |
5672 | 5683 | | |
| |||
0 commit comments