mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-02 19:00:15 +01:00
🎨 支持合并子文档导出 Word/PDF https://github.com/siyuan-note/siyuan/issues/3219
This commit is contained in:
parent
872b341d11
commit
c2d1686164
4 changed files with 16 additions and 3 deletions
|
|
@ -489,7 +489,7 @@ func processIFrame(tree *parse.Tree) {
|
|||
}
|
||||
}
|
||||
|
||||
func AddPDFOutline(id, p string) (err error) {
|
||||
func AddPDFOutline(id, p string, merge bool) (err error) {
|
||||
inFile := p
|
||||
links, err := api.ListToCLinks(inFile)
|
||||
if nil != err {
|
||||
|
|
@ -527,6 +527,14 @@ func AddPDFOutline(id, p string) (err error) {
|
|||
if nil == tree {
|
||||
return
|
||||
}
|
||||
if merge {
|
||||
var mergeErr error
|
||||
tree, mergeErr = mergeSubDocs(tree)
|
||||
if nil != mergeErr {
|
||||
logging.LogErrorf("merge sub docs failed: %s", mergeErr)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var headings []*ast.Node
|
||||
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue