🚨
This commit is contained in:
parent
47f79a6289
commit
9850b2079c
2 changed files with 4 additions and 4 deletions
|
@ -441,9 +441,9 @@ export const hintRef = (key: string, protyle: IProtyle, source: THintSource): IH
|
|||
if (source === "search") {
|
||||
value = `<span data-type="block-ref" data-id="${item.id}" data-subtype="s">${key}${Constants.ZWSP}${item.name || item.refText.replace(new RegExp(Constants.ZWSP, "g"), "")}</span>`;
|
||||
} else if (source === "av") {
|
||||
let refText = item.name || item.refText.replace(new RegExp(Constants.ZWSP, "g"), "")
|
||||
let refText = item.name || item.refText.replace(new RegExp(Constants.ZWSP, "g"), "");
|
||||
if (nodeElement) {
|
||||
refText = item.ial['custom-sy-av-s-text-' + nodeElement.getAttribute("data-av-id")] || refText;
|
||||
refText = item.ial["custom-sy-av-s-text-" + nodeElement.getAttribute("data-av-id")] || refText;
|
||||
}
|
||||
value = `<span data-type="block-ref" data-id="${item.id}" data-subtype="s">${refText}</span>`;
|
||||
}
|
||||
|
|
|
@ -339,9 +339,9 @@ ${unicode2Emoji(emoji.unicode)}</button>`;
|
|||
let blockRefHTML;
|
||||
if (source === "av") {
|
||||
// av 搜索时需要获取值 https://github.com/siyuan-note/siyuan/issues/12020
|
||||
let refText = item.name || item.refText.replace(new RegExp(Constants.ZWSP, "g"), "")
|
||||
let refText = item.name || item.refText.replace(new RegExp(Constants.ZWSP, "g"), "");
|
||||
if (nodeElement) {
|
||||
refText = item.ial['custom-sy-av-s-text-' + nodeElement.getAttribute("data-av-id")] || refText;
|
||||
refText = item.ial["custom-sy-av-s-text-" + nodeElement.getAttribute("data-av-id")] || refText;
|
||||
}
|
||||
blockRefHTML = `<span data-type="block-ref" data-id="${item.id}" data-subtype="s">${refText}</span>`;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue