From bc5724fed667aa5649bc39ca2e170ec2dfd32172 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 8 Mar 2025 14:22:54 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/14299 --- app/src/protyle/toolbar/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index 3ab99034f..78c69c606 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -565,6 +565,17 @@ export class Toolbar { }); } types = [...new Set(types)]; + if (types.includes("block-ref") && item.getAttribute("data-subtype") === "d") { + // https://github.com/siyuan-note/siyuan/issues/14299 + if (previousElement.getAttribute("data-id") === item.getAttribute("data-id")) { + previousElement.setAttribute("data-subtype", "s"); + item.setAttribute("data-subtype", "s"); + } + if (nextElement.getAttribute("data-id") === item.getAttribute("data-id")) { + nextElement.setAttribute("data-subtype", "s"); + item.setAttribute("data-subtype", "s"); + } + } if (index === 0 && previousElement && previousElement.nodeType !== 3 && isArrayEqual(types, (previousElement.getAttribute("data-type") || "").split(" ")) && hasSameTextStyle(item, previousElement, textObj)) {