From 3ba4eb755f1e4303590ad8fbc84d087be0ee6da8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 4 Sep 2024 11:36:21 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/12020 --- app/src/protyle/hint/index.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/protyle/hint/index.ts b/app/src/protyle/hint/index.ts index a7f8354fe..121cdf3d8 100644 --- a/app/src/protyle/hint/index.ts +++ b/app/src/protyle/hint/index.ts @@ -339,7 +339,13 @@ ${unicode2Emoji(emoji.unicode)}`; ${window.siyuan.languages.newFile} ${response.data.k}`; } response.data.blocks.forEach((item: IBlock, index: number) => { - const blockRefHTML = `${oldValue}`; + let blockRefHTML; + if (source === "av") { + // av 搜索时需要获取值 https://github.com/siyuan-note/siyuan/issues/12020 + blockRefHTML = `${item.name || item.refText.replace(new RegExp(Constants.ZWSP, "g"), "")}`; + } else { + blockRefHTML = `${oldValue}`; + } searchHTML += ``; @@ -481,7 +487,10 @@ ${genHintItemHTML(item)} updateAttrViewCellAnimation(cellElement, { type: "block", isDetached: false, - block: {content: tempElement.textContent, id: sourceId} + block: { + content: tempElement.textContent, + id: sourceId + } }); } return;