Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:bug: https://github.com/siyuan-note/siyuan/issues/16321

Daniel1f66e778f4ae
diff --git a/kernel/model/export.go b/kernel/model/export.go
index aad640c0e0..49ffef2cb1 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -2232,6 +2232,9 @@ func exportMarkdownContent0(id string, tree *parse.Tree, cloudAssetsBase string,
}
sameDir := path.Dir(href) == currentDocDir
+ if strings.HasPrefix(href, "#") {
+ sameDir = true
+ }
href = util.FilterFilePath(href)
if !sameDir {
var relErr error