Skip to content

Commit

Permalink
Support spec.keepAdjacent in joinForwards and joinBackwards
Browse files Browse the repository at this point in the history
  • Loading branch information
tslocke committed Nov 25, 2021
1 parent ca85fa2 commit 1397636
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ function deleteBarrier(state, $cut, dispatch) {

let canDelAfter = $cut.parent.canReplace($cut.index(), $cut.index() + 1)
if (canDelAfter &&
!before.type.spec.keepAdjacent &&
(conn = (match = before.contentMatchAt(before.childCount)).findWrapping(after.type)) &&
match.matchType(conn[0] || after.type).validEnd) {
if (dispatch) {
Expand Down

0 comments on commit 1397636

Please sign in to comment.