mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 00:47:15 -04:00
Add BlockStack.Len() for convenience
This commit is contained in:
@@ -100,7 +100,7 @@ func (tr *TermRenderer) RenderNode(w io.Writer, node *bf.Node, entering bool) bf
|
||||
|
||||
e := tr.NewElement(node)
|
||||
if entering {
|
||||
if len(*bs) > 0 {
|
||||
if bs.Len() > 0 {
|
||||
writeTo = io.Writer(bs.Current().Block)
|
||||
}
|
||||
_, _ = writeTo.Write([]byte(e.Entering))
|
||||
@@ -113,7 +113,7 @@ func (tr *TermRenderer) RenderNode(w io.Writer, node *bf.Node, entering bool) bf
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if len(*bs) > 0 {
|
||||
if bs.Len() > 0 {
|
||||
writeTo = io.Writer(bs.Parent().Block)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user