Skip to content

Commit e280a02

Browse files
authored
fix(core): only respect text of node before current position (#2937) (#2941)
1 parent 110b5da commit e280a02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/core/src/helpers/getTextContentFromNodes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => {
99
(node, pos, parent, index) => {
1010
textBefore += node.type.spec.toText?.({
1111
node, pos, parent, index,
12-
}) || node.textContent || '%leaf%'
12+
}) || $from.nodeBefore?.text || '%leaf%'
1313
},
1414
)
1515

0 commit comments

Comments
 (0)