mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 14:59:27 +08:00
fix(core): use correct position for getMarksBetween (#5412)
This commit is contained in:
parent
e143fb4ca3
commit
efb27faf54
5
.changeset/real-kiwis-double.md
Normal file
5
.changeset/real-kiwis-double.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@tiptap/core": patch
|
||||
---
|
||||
|
||||
This fixes a discrepency between `getMarksBetween` and `isActive(markName)` where the position used for getMarksBetween was off by one
|
@ -12,7 +12,7 @@ export function getMarksBetween(from: number, to: number, doc: ProseMirrorNode):
|
||||
.resolve(from)
|
||||
.marks()
|
||||
.forEach(mark => {
|
||||
const $pos = doc.resolve(from - 1)
|
||||
const $pos = doc.resolve(from)
|
||||
const range = getMarkRange($pos, mark.type)
|
||||
|
||||
if (!range) {
|
||||
|
Loading…
Reference in New Issue
Block a user