@nerd-bible/wordgard 0.5.3-beta3 → 0.5.3-beta4
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/dist/doc.js +6 -3
- package/dist/table.js +1 -1
- package/package.json +1 -1
package/dist/doc.js
CHANGED
|
@@ -3154,9 +3154,12 @@ function fitReplacement(doc, from, to, slice, context) {
|
|
|
3154
3154
|
cx = cx.parent;
|
|
3155
3155
|
}
|
|
3156
3156
|
}
|
|
3157
|
-
for (let i =
|
|
3158
|
-
if (
|
|
3159
|
-
|
|
3157
|
+
for (let i = -1; i < context.length; i++) {
|
|
3158
|
+
if (i == preferredContext)
|
|
3159
|
+
continue;
|
|
3160
|
+
let depth = i < 0 ? preferredContext : i;
|
|
3161
|
+
if (doc.schema.canContain(from.parent.node.type, context[depth].type)) {
|
|
3162
|
+
slice = closeSlice(doc.schema, slice, context, depth + 1, true);
|
|
3160
3163
|
break;
|
|
3161
3164
|
}
|
|
3162
3165
|
}
|
package/dist/table.js
CHANGED
|
@@ -790,7 +790,7 @@ function pastedCells(schema, slice, context) {
|
|
|
790
790
|
tok.type == Table.type) {
|
|
791
791
|
table = tok;
|
|
792
792
|
}
|
|
793
|
-
else if (context.
|
|
793
|
+
else if (context.some(tag => isTableContent(schema, tag.type)) ||
|
|
794
794
|
slice.content.some(tok => tok.tokenType != Token.Type.Close && isTableContent(schema, tok.type))) {
|
|
795
795
|
table = fitSlice(schema, Table, slice, context);
|
|
796
796
|
}
|