mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-05-05 18:09:42 -05:00
This commit is contained in:
@@ -187,14 +187,15 @@ func fillAttributeViewGalleryCardCover(attrView *av.AttributeView, view *av.View
|
||||
})
|
||||
|
||||
if "" == galleryCard.CoverURL {
|
||||
if ast.NodeDocument == node.Type {
|
||||
isDoc := ast.NodeDocument == node.Type
|
||||
if isDoc {
|
||||
node = node.FirstChild
|
||||
}
|
||||
|
||||
buf := bytes.Buffer{}
|
||||
for c := node; nil != c; c = c.Next {
|
||||
buf.WriteString(renderBlockDOMByNode(c, luteEngine))
|
||||
if 1024*4 < buf.Len() {
|
||||
if !isDoc || 1024*4 < buf.Len() {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user