Revert "fix a bug for getting mark range, fix #156"

This reverts commit 0cf905abb9.
This commit is contained in:
Marius Tolzmann
2019-05-03 19:06:19 +02:00
parent 392f8a20b3
commit d057d5d7d9

View File

@@ -22,14 +22,12 @@ export default function ($pos = null, type = null) {
startPos -= $pos.parent.child(startIndex).nodeSize startPos -= $pos.parent.child(startIndex).nodeSize
} }
const endIndex = $pos.indexAfter() let endIndex = $pos.indexAfter()
const endPos = startPos + start.node.nodeSize let endPos = startPos + start.node.nodeSize
while (endIndex < $pos.parent.childCount && link.isInSet($pos.parent.child(endIndex).marks)) {
// disable for now. see #156 endPos += $pos.parent.child(endIndex).nodeSize
// while (endIndex < $pos.parent.childCount && link.isInSet($pos.parent.child(endIndex).marks)) { endIndex += 1
// endPos += $pos.parent.child(endIndex).nodeSize }
// endIndex += 1
// }
return { from: startPos, to: endPos } return { from: startPos, to: endPos }