prosemirror-transform
Advanced tools
Comparing version 1.2.9 to 1.2.10
@@ -0,1 +1,7 @@ | ||
## 1.2.10 (2021-02-05) | ||
### Bug fixes | ||
Fix an issue where `Transform.removeMark`, when given a mark type, would only remove the first instance from nodes that had multiple marks of the type. | ||
## 1.2.9 (2021-01-19) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "prosemirror-transform", | ||
"version": "1.2.9", | ||
"version": "1.2.10", | ||
"description": "ProseMirror document transformations", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -51,4 +51,7 @@ import {MarkType, Slice, Fragment} from "prosemirror-model" | ||
if (mark instanceof MarkType) { | ||
let found = mark.isInSet(node.marks) | ||
if (found) toRemove = [found] | ||
let set = node.marks, found | ||
while (found = mark.isInSet(set)) { | ||
;(toRemove || (toRemove = [])).push(mark) | ||
set = found.removeFromSet(set) | ||
} | ||
} else if (mark) { | ||
@@ -55,0 +58,0 @@ if (mark.isInSet(node.marks)) toRemove = [mark] |
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
4376
487248
21