prosemirror-model
Advanced tools
Comparing version 1.14.3 to 1.15.0
@@ -0,1 +1,7 @@ | ||
## 1.15.0 (2021-10-25) | ||
### New features | ||
`textBetween` now allows its leaf text argument to be a function. | ||
## 1.14.3 (2021-07-22) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-model", | ||
"version": "1.14.3", | ||
"version": "1.15.0", | ||
"description": "ProseMirror's document model", | ||
@@ -23,3 +23,3 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"mocha": "^3.0.2", | ||
"mocha": "^9.1.2", | ||
"ist": "^1.0.0", | ||
@@ -26,0 +26,0 @@ "jsdom": "^10.1.0", |
@@ -43,3 +43,3 @@ import {findDiffStart, findDiffEnd} from "./diff" | ||
// :: (number, number, ?string, ?string) → string | ||
// :: (number, number, ?string, ?string | ?(leafNode: Node) -> string) → string | ||
// Extract the text between `from` and `to`. See the same method on | ||
@@ -54,3 +54,3 @@ // [`Node`](#model.Node.textBetween). | ||
} else if (node.isLeaf && leafText) { | ||
text += leafText | ||
text += typeof leafText === 'function' ? leafText(node): leafText | ||
separated = !blockSeparator | ||
@@ -57,0 +57,0 @@ } else if (!separated && node.isBlock) { |
@@ -96,3 +96,3 @@ import {Fragment} from "./fragment" | ||
// :: (number, number, ?string, ?string) → string | ||
// :: (number, number, ?string, ?string | ?(leafNode: Node) -> string) → string | ||
// Get all text between positions `from` and `to`. When | ||
@@ -99,0 +99,0 @@ // `blockSeparator` is given, it will be inserted whenever a new |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
900962