🎨 支持合并子文档导出 Word/PDF https://github.com/siyuan-note/siyuan/issues/3219

This commit is contained in:
Liang Ding 2022-12-11 11:51:04 +08:00
parent d619948544
commit e71c120a97
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 12 additions and 8 deletions

View file

@ -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,