Repository navigation
Fix: Delete key on empty heading transforms following paragraph into heading #78779
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
Merged
ellatrix
merged 15 commits into
WordPress:trunk
from
coderGtm:fix/heading-block-delete-flow
Aug 13, 2026
Merged
Changes from 5 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
03329e5
fix: improve block merging behavior for empty blocks
coderGtm 6209531
test: add tests for empty block removal merge behavior
coderGtm 61fb091
Merge branch 'trunk' into fix/heading-block-delete-flow
coderGtm 671b18c
Merge branch 'trunk' into fix/heading-block-delete-flow
coderGtm e826df6
Merge branch 'trunk' into fix/heading-block-delete-flow
coderGtm 44531a2
fix: refine block merging logic for empty blocks
coderGtm 34d9b45
fix: enhance merging behavior for nested list items during deletion
coderGtm 27a3d1c
Merge branch 'trunk' into fix/heading-block-delete-flow
coderGtm d132e07
fix: update tests for refined logic
coderGtm 08d1191
Restore the nested list item merge behaviour
ellatrix efd3799
Match the sibling guard when removing an empty block
ellatrix bef8476
Cover forward deleting an empty heading end to end
ellatrix 1135e6c
Merge remote-tracking branch 'origin/trunk' into pr-78779
ellatrix bc3bf85
Fold the empty block into the unmodified default guard
ellatrix e06b84f
Only treat text blocks as removable when empty
ellatrix File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
We probably need to check if
blockA.name !== blockB.nameand also it would be better to have the code below theif ( ! blockAType.merge ) {block for two reasons:blockAType.mergecheckif ( isUnmodifiedDefaultBlock( blockB ) ) {block flow. Placement here changes the current behavior a bit right now and we can avoid it.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.
Thanks @ntsekouras! That actually is a better way. I made the change and tested the behaviour and It works flawlessly.
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.
Failing
listtests seem that something different (or more) is needed. --cc @ellatrix for any quick insights due to the heavy work on this area.