Vanessa 2024-01-29 14:47:38 +08:00
parent b839c2fbc3
commit c8bb337ede

View file

@ -373,9 +373,9 @@ export const hintRef = (key: string, protyle: IProtyle, source: THintSource): IH
});
}
response.data.blocks.forEach((item: IBlock) => {
let value = `<span data-type="block-ref" data-id="${item.id}" data-subtype="d">${item.name || item.refText}</span>`;
let value = `<span data-type="block-ref" data-id="${item.id}" data-subtype="d">${item.name || item.refText.replace(new RegExp(Constants.ZWSP, "g"), "")}</span>`;
if (source === "search") {
value = `<span data-type="block-ref" data-id="${item.id}" data-subtype="s">${key}${Constants.ZWSP}${item.name || item.refText}</span>`;
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>`;
}
dataList.push({
value,