From 92cbdc198793b3eb22bb968b48953dfe9d050633 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 18 Nov 2024 23:16:08 +0800 Subject: [PATCH] :art: https://github.com/siyuan-note/siyuan/issues/13175 --- app/src/menus/tab.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/menus/tab.ts b/app/src/menus/tab.ts index 39e089cee..58e63aea4 100644 --- a/app/src/menus/tab.ts +++ b/app/src/menus/tab.ts @@ -12,6 +12,7 @@ import {Wnd} from "../layout/Wnd"; import {getAllWnds} from "../layout/getAll"; import {Asset} from "../asset"; import {writeText} from "../protyle/util/compatibility"; +import {getAssetName, pathPosix} from "../util/pathName"; const closeMenu = (tab: Tab) => { const unmodifiedTabs: Tab[] = []; @@ -213,7 +214,7 @@ export const initTabMenu = (app: App, tab: Tab) => { label: window.siyuan.languages.copy, icon: "iconCopy", click() { - writeText(`[${model.parent.title}](${model.path})`); + writeText(`[${getAssetName(model.parent.title)}${pathPosix().extname(model.path)}](${model.path})`); } }).element); }