From a5229de6d0eaac2d2df516c6b11cab36b592a28c Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 27 Jan 2023 17:56:29 +0800 Subject: [PATCH] =?UTF-8?q?:zap:=20=E6=94=B9=E8=BF=9B=E5=A4=9A=E4=B8=AA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E7=82=B9=E7=9A=84=E6=80=A7=E8=83=BD=20https:?= =?UTF-8?q?//github.com/siyuan-note/siyuan/issues/7177?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/export.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/model/export.go b/kernel/model/export.go index b082ab3e5..f29212648 100644 --- a/kernel/model/export.go +++ b/kernel/model/export.go @@ -20,8 +20,6 @@ import ( "bytes" "errors" "fmt" - "github.com/imroc/req/v3" - "github.com/siyuan-note/httpclient" "net/http" "net/url" "os" @@ -44,7 +42,9 @@ import ( "github.com/88250/pdfcpu/pkg/pdfcpu" "github.com/emirpasic/gods/sets/hashset" "github.com/emirpasic/gods/stacks/linkedliststack" + "github.com/imroc/req/v3" "github.com/siyuan-note/filelock" + "github.com/siyuan-note/httpclient" "github.com/siyuan-note/logging" "github.com/siyuan-note/siyuan/kernel/sql" "github.com/siyuan-note/siyuan/kernel/treenode" @@ -1443,7 +1443,7 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool, } if addTitle { - if root, _ := getBlock(id); nil != root { + if root, _ := getBlock(id, tree); nil != root { title := &ast.Node{Type: ast.NodeHeading, HeadingLevel: 1, KramdownIAL: parse.Map2IAL(root.IAL)} content := html.UnescapeString(root.Content) title.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(content)})