Repository navigation
Interactivity API: Turn named capturing groups back into numbered ones inside toVdom - #61728
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
I've added the cc: @sirreal |
sirreal
left a comment
There was a problem hiding this comment.
I didn't test, but the changes look good.
| const namespaceAndPath = | ||
| nsPathRegExp.exec( attributeValue ); |
There was a problem hiding this comment.
Nit: I don't love this name, maybe regexResult?
|
We can leave it bug, I've also added a Gutenberg backport label because it would be nice to get this out in a patch version if there is one. |
…s inside `toVdom` (WordPress#61728) * Back to numbered capturing groups * Change attrValue to attributeValue * Move `attributeValue` initialization * Change `namespaceAndPath` to `regexResult` Co-authored-by: DAreRodz <darerodz@git.wordpress.org> Co-authored-by: sirreal <jonsurrell@git.wordpress.org>
What?
Reverts a recent change in dbf231a that introduced named capturing groups in the RegExp used to parse directive values.
gutenberg/packages/interactivity/src/vdom.ts
Lines 98 to 103 in dbf231a
Why?
According to caniuse.com, named capturing groups have global support of 95.62%. Although the value is quite high, there could be users for whom the Interactivity API does not work just by using this feature.
For instance, global support of Proxy objects is 97.28%.
How?
Using numbered capturing groups instead.