Handle write buffers & cascading styles in BlockStack

This commit is contained in:
Christian Muehlhaeuser
2019-12-04 13:36:31 +01:00
parent 9134cddd48
commit 038f2dd684
7 changed files with 81 additions and 76 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ func (e *CodeBlockElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer)
iw := &IndentWriter{
Indent: indent + margin,
IndentFunc: func(wr io.Writer) {
renderText(w, tr.blockStyle.Parent(), " ")
renderText(w, tr.blockStack.Parent().Style, " ")
},
Forward: &AnsiWriter{
Forward: w,