@portabletext/editor 1.5.3 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js
CHANGED
|
@@ -3514,7 +3514,7 @@ function createWithPortableTextMarkModel(editorActor, types2) {
|
|
|
3514
3514
|
const children = slate.Node.children(editor, path);
|
|
3515
3515
|
for (const [child, childPath] of children) {
|
|
3516
3516
|
const nextNode = node.children[childPath[1] + 1];
|
|
3517
|
-
if (editor.isTextSpan(child) && editor.isTextSpan(nextNode) &&
|
|
3517
|
+
if (editor.isTextSpan(child) && editor.isTextSpan(nextNode) && child.marks?.every((mark) => nextNode.marks?.includes(mark)) && nextNode.marks?.every((mark) => child.marks?.includes(mark))) {
|
|
3518
3518
|
debug$c("Merging spans", JSON.stringify(child, null, 2), JSON.stringify(nextNode, null, 2)), editorActor.send({
|
|
3519
3519
|
type: "normalizing"
|
|
3520
3520
|
}), slate.Transforms.mergeNodes(editor, {
|