🐛 导出 PDF 只有一页 https://github.com/siyuan-note/insider/issues/1061
This commit is contained in:
parent
106a8db616
commit
361a199331
2 changed files with 9 additions and 2 deletions
4
app/stage/protyle/js/lute/lute.min.js
vendored
4
app/stage/protyle/js/lute/lute.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -394,6 +394,10 @@ func ExportHTML(id, savePath string, pdf bool) (name, dom string) {
|
|||
|
||||
assets := assetsLinkDestsInTree(tree)
|
||||
for _, asset := range assets {
|
||||
if strings.Contains(asset, "?") {
|
||||
asset = asset[:strings.LastIndex(asset, "?")]
|
||||
}
|
||||
|
||||
srcAbsPath, err := GetAssetAbsPath(asset)
|
||||
if nil != err {
|
||||
logging.LogWarnf("resolve path of asset [%s] failed: %s", asset, err)
|
||||
|
@ -552,6 +556,9 @@ func AddPDFOutline(id, p string) (err error) {
|
|||
cur, ok := stack.Peek()
|
||||
if !ok {
|
||||
bm := bms[h.ID]
|
||||
if nil == bm {
|
||||
break L
|
||||
}
|
||||
bm.Level = h.HeadingLevel
|
||||
stack.Push(bm)
|
||||
topBms = append(topBms, bm)
|
||||
|
|
Loading…
Add table
Reference in a new issue