Skip to content

Commit

Permalink
Expose "range" to textSerializer. Used in "getTextBetween"
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Pantic authored and panta82 committed May 10, 2022
1 parent a9e8f48 commit 2115845
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/helpers/getTextBetween.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export function getTextBetween(
pos,
parent,
index,
range,
})
} else if (node.isText) {
text += node?.text?.slice(Math.max(from, pos) - pos, to - pos)
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ export type TextSerializer = (props: {
pos: number,
parent: ProseMirrorNode,
index: number,
range: Range,
}) => string

export type ExtendedRegExpMatchArray = RegExpMatchArray & {
Expand Down

0 comments on commit 2115845

Please sign in to comment.