Use IndentFunc to style indents correctly

This commit is contained in:
Christian Muehlhaeuser
2019-12-04 06:38:55 +01:00
parent ca06d9968c
commit 8bcc61ace1
3 changed files with 9 additions and 0 deletions
+3
View File
@@ -23,6 +23,9 @@ func (e *CodeBlockElement) Render(w io.Writer, node *bf.Node, tr *TermRenderer)
iw := &IndentWriter{
Indent: indent,
IndentFunc: func(wr io.Writer) {
renderText(w, tr.blockStyle.Parent(), " ")
},
Forward: &AnsiWriter{
Forward: w,
},