This commit is contained in:
Liang Ding 2022-09-19 16:53:22 +08:00
parent 106a8db616
commit 361a199331
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
2 changed files with 9 additions and 2 deletions

File diff suppressed because one or more lines are too long

View file

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