fix: 行内代码在文字中插入时最后一个字会挤掉

This commit is contained in:
yanmao 2021-12-07 22:25:19 +08:00
parent 6e48dd4366
commit 8eb946c5ef
1 changed files with 3 additions and 3 deletions

View File

@ -519,9 +519,9 @@ class NodeModel implements NodeModelInterface {
if (startNode.isText() && /\u200b$/.test(leftText)) {
//零宽字符前面还有其它字符。或者节点前面还有节点不能是inline节点。或者前面没有节点了并且父级不是inline节点
if (
text.length > 1 ||
(prev && !this.isInline(prev)) ||
(!prev && parent && !this.isInline(parent))
text.length > 1 &&
((prev && !this.isInline(prev)) ||
(!prev && parent && !this.isInline(parent)))
) {
startNode
.get<Text>()!