Block Library: Add missing transforms between Verse and Preformatted blocks#70101
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. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR!
This PR seems to contain duplicate transformations:
- Verse block:
- From: core/preformatted
- To: core/preformatted
- Preformatted block:
- From: core/verse
- To: core/verse
If you register just one transformation each as shown below, everything should work fine.
- Preformatted block:
- From: core/verse
- To: core/verse
This means that we shouldn't need to change anything in the Verse block.
|
Thanks for pointing that out—sorry for the oversight. I’ve removed the duplicate transformation. |
…blocks (WordPress#70101) * Add missing transforms between Verse and Preformatted block * Revert test file changes * Update test files * Restart unit tests * Restart unit tests * Update test snapshots * Remove duplicate transformations between Verse and Preformatted blocks * refactor: simplify verse block transform Co-authored-by: Sukhendu2002 <sukhendu2002@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
Part of: #63635
Add missing block transforms between Verse and Preformatted blocks.
Why?
Currently, there's no way to transform between Verse and Preformatted blocks. Adding this transformation improves the editor experience.
Testing Instructions
Screenshots or screencast
Screen.Recording.2025-05-12.at.4.46.17.PM.mov