Skip to content

Commit

Permalink
Allow textblock merging even the end position is at block end in repl…
Browse files Browse the repository at this point in the history
…aceStep

FIX: Make replacements that span to the end of a textblock more consistent with
those ending in the middle of the block.

Issue ProseMirror/prosemirror#1259
  • Loading branch information
marijnh committed Apr 5, 2022
1 parent b90c677 commit 7f6622d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/replace.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class Fitter {
}

mustMoveInline() {
if (!this.$to.parent.isTextblock || this.$to.end() == this.$to.pos) return -1
if (!this.$to.parent.isTextblock) return -1
let top = this.frontier[this.depth], level
if (!top.type.isTextblock || !contentAfterFits(this.$to, this.$to.depth, top.type, top.match, false) ||
(this.$to.depth == this.depth && (level = this.findCloseLevel(this.$to)) && level.depth == this.depth)) return -1
Expand Down

0 comments on commit 7f6622d

Please sign in to comment.