prosemirror-transform
Advanced tools
Comparing version 1.7.2 to 1.7.3
@@ -0,1 +1,7 @@ | ||
## 1.7.3 (2023-06-01) | ||
### Bug fixes | ||
Fix a bug in `canSplit` that made it interpret the `typesAfter` argument incorrectly on splits of depth greater than 1. | ||
## 1.7.2 (2023-05-17) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-transform", | ||
"version": "1.7.2", | ||
"version": "1.7.3", | ||
"description": "ProseMirror document transformations", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -166,4 +166,6 @@ import {Slice, Fragment, NodeRange, NodeType, Node, Mark, Attrs, ContentMatch} from "prosemirror-model" | ||
let rest = node.content.cutByIndex(index, node.childCount) | ||
let overrideChild = typesAfter && typesAfter[i + 1] | ||
if (overrideChild) | ||
rest = rest.replaceChild(0, overrideChild.type.create(overrideChild.attrs)) | ||
let after = (typesAfter && typesAfter[i]) || node | ||
if (after != node) rest = rest.replaceChild(0, after.type.create(after.attrs)) | ||
if (!node.canReplace(index + 1, node.childCount) || !after.type.validContent(rest)) | ||
@@ -170,0 +172,0 @@ return false |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
296422
6254