From 3b22330b4b68a6f9c60c8d945bee89d4fc27278b Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Thu, 28 Nov 2024 15:37:45 +0800 Subject: [PATCH] :art: Improve exporting block ref https://github.com/siyuan-note/siyuan/issues/13283 --- kernel/model/export.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kernel/model/export.go b/kernel/model/export.go index f00e9c24a..3bc0511e4 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 {