mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-02 15:07:28 -04:00
Create BlockElement even if there's no style for it
This commit is contained in:
+6
-5
@@ -12,12 +12,13 @@ type DocumentElement struct {
|
||||
|
||||
func (e *DocumentElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer) error {
|
||||
rules := tr.style[Document]
|
||||
be := BlockElement{
|
||||
Block: &bytes.Buffer{},
|
||||
Style: rules,
|
||||
}
|
||||
tr.blockStack.Push(be)
|
||||
|
||||
if rules != nil {
|
||||
be := BlockElement{
|
||||
Block: &bytes.Buffer{},
|
||||
Style: rules,
|
||||
}
|
||||
tr.blockStack.Push(be)
|
||||
renderText(tr.blockStack.Current().Block, rules, rules.Prefix)
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user