From 56129699b9a7ec80fa4319db09d565828ae36a41 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Thu, 29 Sep 2022 22:20:09 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6014 --- app/src/protyle/toolbar/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 8bad79d9b..2554eeb45 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -518,6 +518,8 @@ export class Toolbar { const nextNewNode = newNodes[i + 1] as HTMLElement; if (currentNewNode.nodeType !== 3 && nextNewNode && nextNewNode.nodeType !== 3 && isArrayEqual(nextNewNode.getAttribute("data-type").split(" "), currentNewNode.getAttribute("data-type").split(" ")) && + currentNewNode.getAttribute("data-id") === nextNewNode.getAttribute("data-id") && + currentNewNode.getAttribute("data-subtype") === nextNewNode.getAttribute("data-subtype") && currentNewNode.style.color === nextNewNode.style.color && currentNewNode.style.webkitTextFillColor === nextNewNode.style.webkitTextFillColor && currentNewNode.style.webkitTextStroke === nextNewNode.style.webkitTextStroke && @@ -525,7 +527,9 @@ export class Toolbar { currentNewNode.style.fontSize === nextNewNode.style.fontSize && currentNewNode.style.backgroundColor === nextNewNode.style.backgroundColor) { // 合并相同的 node - nextNewNode.innerHTML = currentNewNode.innerHTML + nextNewNode.innerHTML; + if (currentNewNode.getAttribute("data-type").indexOf("block-ref") === -1) { // 引用不虚合并内容 https://ld246.com/article/1664454663564 + nextNewNode.innerHTML = currentNewNode.innerHTML + nextNewNode.innerHTML; + } newNodes.splice(i, 1); i--; } else {