💄 search escape

This commit is contained in:
Vanessa 2023-04-03 12:29:34 +08:00
parent c45352b8b9
commit 7108855a00
2 changed files with 3 additions and 2 deletions

View file

@ -145,6 +145,7 @@
white-space: nowrap;
position: relative;
padding-right: 20px;
line-height: 18px;
}
&__rmpath {

View file

@ -49,14 +49,14 @@ export const openSearch = async (hotkey: string, key?: string, notebookId?: stri
let hPath = "";
let idPath: string[] = [];
if (notebookId) {
hPath = escapeHtml(getNotebookName(notebookId));
hPath = getNotebookName(notebookId);
idPath.push(notebookId);
if (searchPath && searchPath !== "/") {
const response = await fetchSyncPost("/api/filetree/getHPathByPath", {
notebook: notebookId,
path: searchPath.endsWith(".sy") ? searchPath : searchPath + ".sy"
});
hPath = pathPosix().join(hPath, escapeHtml(response.data));
hPath = pathPosix().join(hPath, response.data);
idPath[0] = pathPosix().join(idPath[0], searchPath);
}
} else if (window.siyuan.config.keymap.general.globalSearch.custom === hotkey) {