Skip to content

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

:bug: Export PDF preview fails to load https://github.com/siyuan-note/siyuan/issues/8126

Liang Dingb5a2763fcfb9
diff --git a/kernel/model/export.go b/kernel/model/export.go
index 11b7a092e0..b2f2ac21fe 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -1624,6 +1624,10 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool,
return ast.WalkContinue
} else if treenode.IsFileAnnotationRef(n) {
refID := n.TextMarkFileAnnotationRefID
+ if !strings.Contains(refID, "/") {
+ return ast.WalkSkipChildren
+ }
+
status := processFileAnnotationRef(refID, n, fileAnnotationRefMode)
unlinks = append(unlinks, n)
return status