This commit is contained in:
Vanessa 2023-10-25 10:10:06 +08:00
parent b64dfdd224
commit 78dd63e9df
2 changed files with 2 additions and 2 deletions

View file

@ -367,7 +367,7 @@ export const hintRef = (key: string, protyle: IProtyle, source: THintSource): IH
if (response.data.newDoc) {
const newFileName = Lute.UnEscapeHTMLStr(replaceFileName(response.data.k));
dataList.push({
value: source === "search" ? `((newFile "${newFileName}"${Constants.ZWSP}'${newFileName}${Lute.Caret}'))` : `((newFile '${newFileName}${Lute.Caret}'))`,
value: `((newFile "${newFileName}"${Constants.ZWSP}'${newFileName}${Lute.Caret}'))`,
html: `<div class="b3-list-item__first"><svg class="b3-list-item__graphic"><use xlink:href="#iconFile"></use></svg>
<span class="b3-list-item__text">${window.siyuan.languages.newFile} <mark>${response.data.k}</mark></span></div>`,
});

View file

@ -517,7 +517,7 @@ ${genHintItemHTML(item)}
}, response => {
protyle.toolbar.setInlineMark(protyle, "block-ref", "range", {
type: "id",
color: `${response.data}${Constants.ZWSP}${(fileNames.length === 2 || refIsS) ? "s" : "d"}${Constants.ZWSP}${(fileNames.length === 2 ? fileNames[0] : realFileName).substring(0, window.siyuan.config.editor.blockRefDynamicAnchorTextMaxLen)}`
color: `${response.data}${Constants.ZWSP}${refIsS ? "s" : "d"}${Constants.ZWSP}${(refIsS ? fileNames[0] : realFileName).substring(0, window.siyuan.config.editor.blockRefDynamicAnchorTextMaxLen)}`
});
});
});