mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
This commit is contained in:
parent
8deaeba27b
commit
042927a4ff
1 changed files with 3 additions and 2 deletions
|
|
@ -187,14 +187,15 @@ func fillAttributeViewGalleryCardCover(attrView *av.AttributeView, view *av.View
|
||||||
})
|
})
|
||||||
|
|
||||||
if "" == galleryCard.CoverURL {
|
if "" == galleryCard.CoverURL {
|
||||||
if ast.NodeDocument == node.Type {
|
isDoc := ast.NodeDocument == node.Type
|
||||||
|
if isDoc {
|
||||||
node = node.FirstChild
|
node = node.FirstChild
|
||||||
}
|
}
|
||||||
|
|
||||||
buf := bytes.Buffer{}
|
buf := bytes.Buffer{}
|
||||||
for c := node; nil != c; c = c.Next {
|
for c := node; nil != c; c = c.Next {
|
||||||
buf.WriteString(renderBlockDOMByNode(c, luteEngine))
|
buf.WriteString(renderBlockDOMByNode(c, luteEngine))
|
||||||
if 1024*4 < buf.Len() {
|
if !isDoc || 1024*4 < buf.Len() {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue