From 9dfc77a7e9656668eb9dc8c77b5f2c8f050bc60f Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Sun, 14 Dec 2025 10:33:13 +0800 Subject: [PATCH] :art: Supports converting relative path hyperlinks into document block references after importing Markdown https://github.com/siyuan-note/siyuan/issues/13817 Signed-off-by: Daniel <845765@qq.com> --- kernel/model/import.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/model/import.go b/kernel/model/import.go index f12763b2f..d73a243ad 100644 --- a/kernel/model/import.go +++ b/kernel/model/import.go @@ -828,7 +828,8 @@ func ImportFromLocalPath(boxID, localPath string, toPath string) (err error) { return nil } - if !d.IsDir() && !strings.HasSuffix(currentPath, ".md") && !strings.HasSuffix(currentPath, ".markdown") { + if !d.IsDir() && (!strings.HasSuffix(currentPath, ".md") && !strings.HasSuffix(currentPath, ".markdown") || + strings.Contains(filepath.ToSlash(currentPath), "/assets/")) { // 非 Markdown 文件作为资源文件处理 https://github.com/siyuan-note/siyuan/issues/13817 existName := assetsDone[currentPath] var name string