Skip to content

Commit

Permalink
fix(core): only respect text of node before current position (#2937) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
svenadlung authored Jul 6, 2022
1 parent 110b5da commit e280a02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/helpers/getTextContentFromNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const getTextContentFromNodes = ($from: ResolvedPos, maxMatch = 500) => {
(node, pos, parent, index) => {
textBefore += node.type.spec.toText?.({
node, pos, parent, index,
}) || node.textContent || '%leaf%'
}) || $from.nodeBefore?.text || '%leaf%'
},
)

Expand Down

0 comments on commit e280a02

Please sign in to comment.