mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 支持合并子文档导出 Word/PDF https://github.com/siyuan-note/siyuan/issues/3219
This commit is contained in:
parent
d619948544
commit
e71c120a97
7 changed files with 12 additions and 8 deletions
|
|
@ -504,8 +504,12 @@ func AddPDFOutline(id, p string) (err error) {
|
|||
footnotes := map[string]*pdfcpu.Bookmark{}
|
||||
for _, link := range links {
|
||||
linkID := link.URI[strings.LastIndex(link.URI, "/")+1:]
|
||||
|
||||
title := sql.GetBlock(linkID).Content
|
||||
b := sql.GetBlock(linkID)
|
||||
if nil == b {
|
||||
logging.LogWarnf("pdf outline block [%s] not found", linkID)
|
||||
continue
|
||||
}
|
||||
title := b.Content
|
||||
title, _ = url.QueryUnescape(title)
|
||||
bm := &pdfcpu.Bookmark{
|
||||
Title: title,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue