mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
Parent of the first block has an empty style
This commit is contained in:
+4
-2
@@ -63,8 +63,10 @@ func (s BlockStack) Width(ctx RenderContext) uint {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s BlockStack) Parent() BlockElement {
|
func (s BlockStack) Parent() BlockElement {
|
||||||
if len(s) < 2 {
|
if len(s) == 1 {
|
||||||
return s.Current()
|
return BlockElement{
|
||||||
|
Block: &bytes.Buffer{},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return s[len(s)-2]
|
return s[len(s)-2]
|
||||||
|
|||||||
Reference in New Issue
Block a user