Skip to content

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

:art: Improve exporting block ref https://github.com/siyuan-note/siyuan/issues/13283

Daniel3b22330b4b68
diff --git a/kernel/model/export.go b/kernel/model/export.go
index f00e9c24a9..3bc0511e4c 100644
--- a/kernel/model/export.go
+++ b/kernel/model/export.go
@@ -2153,6 +2153,11 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold, avHiddenCol bool,
// 如果是聚焦导出,可能存在没有使用的脚注定义块,在这里进行清理
// Improve focus export conversion of block refs to footnotes https://github.com/siyuan-note/siyuan/issues/10647
footnotesRefs := ret.Root.ChildrenByType(ast.NodeFootnotesRef)
+ for footnotesDef := footnotesDefBlock.FirstChild; nil != footnotesDef; footnotesDef = footnotesDef.Next {
+ fnRefsInDef := footnotesDef.ChildrenByType(ast.NodeFootnotesRef)
+ footnotesRefs = append(footnotesRefs, fnRefsInDef...)
+ }
+
for footnotesDef := footnotesDefBlock.FirstChild; nil != footnotesDef; footnotesDef = footnotesDef.Next {
exist := false
for _, ref := range footnotesRefs {