浏览代码

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

Liang Ding 2 年之前
父节点
当前提交
b5a2763fcf
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      kernel/model/export.go

+ 4 - 0
kernel/model/export.go

@@ -1624,6 +1624,10 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool,
 				return ast.WalkContinue
 				return ast.WalkContinue
 			} else if treenode.IsFileAnnotationRef(n) {
 			} else if treenode.IsFileAnnotationRef(n) {
 				refID := n.TextMarkFileAnnotationRefID
 				refID := n.TextMarkFileAnnotationRefID
+				if !strings.Contains(refID, "/") {
+					return ast.WalkSkipChildren
+				}
+
 				status := processFileAnnotationRef(refID, n, fileAnnotationRefMode)
 				status := processFileAnnotationRef(refID, n, fileAnnotationRefMode)
 				unlinks = append(unlinks, n)
 				unlinks = append(unlinks, n)
 				return status
 				return status