fix: unwrap mark will lose zero-width characters
This commit is contained in:
parent
9e7baf11fe
commit
37ebb1a6a6
|
@ -1691,7 +1691,7 @@ class Mark implements MarkModelInterface {
|
|||
const childrenNodes = mark.children();
|
||||
childrenNodes.each((_, index) => {
|
||||
const child = childrenNodes.eq(index);
|
||||
if (child?.isText()) {
|
||||
if (child?.isText() && !child.next()?.isCursor()) {
|
||||
const text = child.text();
|
||||
if (text.length === 1 && /\u200b/.test(text)) {
|
||||
child.remove();
|
||||
|
|
Loading…
Reference in New Issue