-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Rich text: fix link paste for internal paste #59063
Conversation
Size Change: +287 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
Flaky tests detected in 5313b31. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7916318807
|
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, I see what you mean. Thanks, LGTM :)
@@ -58,13 +58,35 @@ export function usePasteHandler( props ) { | |||
const isInternal = | |||
event.clipboardData.getData( 'rich-text' ) === 'true'; | |||
|
|||
function pasteInline( content ) { | |||
const transformed = formatTypes.reduce( | |||
( accumlator, { __unstablePasteRule } ) => { |
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.
While we're here, we can fix the typo:
( accumlator, { __unstablePasteRule } ) => { | |
( accumulator, { __unstablePasteRule } ) => { |
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.
What do you mean, you didn't know about the abbreviation accum'lator? 😄
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. |
Co-authored-by: ellatrix <[email protected]> Co-authored-by: mcsf <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: annezazu <[email protected]>
I just cherry-picked this PR to the more/backports-for-beta3 branch to get it included in the next release: 2958043 |
Co-authored-by: ellatrix <[email protected]> Co-authored-by: mcsf <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: annezazu <[email protected]>
What?
Fixes #57487
Alternative to #58786
Why?
Added an e2e test that fails in trunk:
How?
The transforms must be run for external as well as internal paste.
Testing Instructions
See test and issue linked: type out a link, copy it, then paste it over a word.
Testing Instructions for Keyboard
Screenshots or screencast