-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure to replace all instances of :where(body)
instead of just …
#61602
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @simom, @rxbracho. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. 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. |
Size Change: +61 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, good catch! This is testing nicely for me.
With TT4 theme applied you can see the difference quite clearly:
Before | After |
---|---|
It'd be great to get this fix in, so no need to hold up landing, but would it be worth updating the tests to include a couple examples for this replacement behaviour?
describe( 'transformStyles', () => { |
I added one test, reasoning that checking for multiple instances of |
Thanks for that, the added test looks good to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @tellthemachines!
…the first.
What?
Fixes #61565 and possibly also #61582.
The non-iframed editor all instances of
body
with.editor-styles-wrapper
in the editor styles. It also checks for:where(body)
, but because it was usingreplace
with a string instead of a regex, only the first instance was being replaced.This PR adds a regex with the global flag, so all instances of
:where(body)
will be replaced.Testing Instructions