This commit is contained in:
Liang Ding 2022-09-14 10:25:15 +08:00
parent 1312c0a597
commit 9fc80a5edd
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -58,6 +58,9 @@ func DocImageAssets(rootID string) (ret []string, err error) {
if ast.NodeImage == n.Type {
linkDest := n.ChildByType(ast.NodeLinkDest)
dest := linkDest.Tokens
if 1 > len(dest) { // 双击打开图片不对 https://github.com/siyuan-note/siyuan/issues/5876
return ast.WalkContinue
}
ret = append(ret, gulu.Str.FromBytes(dest))
}
return ast.WalkContinue