From 76ef70ae68a15fbeec08a0c474698638929557aa Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 30 Sep 2022 21:49:33 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6028 --- 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 2554eeb45..3059869c5 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -527,7 +527,11 @@ export class Toolbar { currentNewNode.style.fontSize === nextNewNode.style.fontSize && currentNewNode.style.backgroundColor === nextNewNode.style.backgroundColor) { // 合并相同的 node - if (currentNewNode.getAttribute("data-type").indexOf("block-ref") === -1) { // 引用不虚合并内容 https://ld246.com/article/1664454663564 + if (currentNewNode.getAttribute("data-type").indexOf("inline-math") > -1) { + // 数学公式合并 data-content https://github.com/siyuan-note/siyuan/issues/6028 + nextNewNode.setAttribute("data-content", currentNewNode.getAttribute("data-content") + nextNewNode.getAttribute("data-content")) + } else if (currentNewNode.getAttribute("data-type").indexOf("block-ref") === -1) { + // 引用不虚合并内容 https://ld246.com/article/1664454663564 nextNewNode.innerHTML = currentNewNode.innerHTML + nextNewNode.innerHTML; } newNodes.splice(i, 1);