fix: mark 嵌套错误,无法 unwrap
This commit is contained in:
parent
bc3d646a0b
commit
f0a15b32ee
|
@ -887,7 +887,7 @@ class Mark implements MarkModelInterface {
|
|||
}
|
||||
if (result) return false;
|
||||
|
||||
let targetNode = parent;
|
||||
let targetNode = node.parent();
|
||||
let curPlugin = targetNode
|
||||
? this.findPlugin(targetNode)
|
||||
: undefined;
|
||||
|
|
|
@ -416,7 +416,11 @@ class NodeModel implements NodeModelInterface {
|
|||
if (!prev || prev.isText()) {
|
||||
child.allChildren().forEach((child) => {
|
||||
const text = child.text();
|
||||
if (child.type === getDocument().TEXT_NODE && !!text) {
|
||||
if (
|
||||
child.type === getDocument().TEXT_NODE &&
|
||||
!!text &&
|
||||
!child.next()?.isCursor()
|
||||
) {
|
||||
child.text(text.replace(/\u200b/, ''));
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue