mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-02 06:57:30 -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 {
|
||||
if len(s) < 2 {
|
||||
return s.Current()
|
||||
if len(s) == 1 {
|
||||
return BlockElement{
|
||||
Block: &bytes.Buffer{},
|
||||
}
|
||||
}
|
||||
|
||||
return s[len(s)-2]
|
||||
|
||||
Reference in New Issue
Block a user