mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
⚡ 改进多个功能点的性能 https://github.com/siyuan-note/siyuan/issues/7177
This commit is contained in:
parent
c3f651b6c9
commit
a5229de6d0
1 changed files with 3 additions and 3 deletions
|
|
@ -20,8 +20,6 @@ import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/imroc/req/v3"
|
|
||||||
"github.com/siyuan-note/httpclient"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
|
|
@ -44,7 +42,9 @@ import (
|
||||||
"github.com/88250/pdfcpu/pkg/pdfcpu"
|
"github.com/88250/pdfcpu/pkg/pdfcpu"
|
||||||
"github.com/emirpasic/gods/sets/hashset"
|
"github.com/emirpasic/gods/sets/hashset"
|
||||||
"github.com/emirpasic/gods/stacks/linkedliststack"
|
"github.com/emirpasic/gods/stacks/linkedliststack"
|
||||||
|
"github.com/imroc/req/v3"
|
||||||
"github.com/siyuan-note/filelock"
|
"github.com/siyuan-note/filelock"
|
||||||
|
"github.com/siyuan-note/httpclient"
|
||||||
"github.com/siyuan-note/logging"
|
"github.com/siyuan-note/logging"
|
||||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||||
|
|
@ -1443,7 +1443,7 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
if addTitle {
|
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)}
|
title := &ast.Node{Type: ast.NodeHeading, HeadingLevel: 1, KramdownIAL: parse.Map2IAL(root.IAL)}
|
||||||
content := html.UnescapeString(root.Content)
|
content := html.UnescapeString(root.Content)
|
||||||
title.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(content)})
|
title.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(content)})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue