From 3d3486e93ec460098501d5002b4556b898494bb0 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 13 Nov 2025 12:27:26 +0800 Subject: [PATCH] :art: Supports converting relative path hyperlinks into document block references after importing Markdown https://github.com/siyuan-note/siyuan/issues/13817#issuecomment-3523687650 Signed-off-by: Daniel <845765@qq.com> --- kernel/model/import.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index 039a77999..0b4983ffd 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -816,8 +816,8 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) { return nil } - if !d.IsDir() && strings.Contains(filepath.ToSlash(currentPath), "/assets/") { - // assets 文件夹下的文件算作资源文件 + if !d.IsDir() && !strings.HasSuffix(currentPath, ".md") && !strings.HasSuffix(currentPath, ".markdown") { + // 非 Markdown 文件作为资源文件处理 https://github.com/siyuan-note/siyuan/issues/13817 existName := assetsDone[currentPath] var name string if "" == existName {