浏览代码

:bug: Exporting PDF hangs after focusing heading block Fix https://github.com/siyuan-note/siyuan/issues/7848

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

+ 2 - 0
kernel/model/export.go

@@ -628,7 +628,9 @@ func prepareExportTree(bt *treenode.BlockTree) (ret *parse.Tree) {
 			first.InsertBefore(node)
 		}
 	}
+	ret.Path = bt.Path
 	ret.HPath = bt.HPath
+	ret.Box = bt.BoxID
 	return
 }
 

+ 1 - 1
kernel/model/export_merge.go

@@ -25,7 +25,7 @@ import (
 
 func mergeSubDocs(rootTree *parse.Tree) (ret *parse.Tree, err error) {
 	ret = rootTree
-	rootBlock := &Block{Box: rootTree.Box, ID: rootTree.ID, Path: rootTree.Path}
+	rootBlock := &Block{Box: rootTree.Box, ID: rootTree.ID, Path: rootTree.Path, HPath: rootTree.HPath}
 	if err = buildBlockChildren(rootBlock); nil != err {
 		return
 	}