mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-01 22:47:25 -04:00
Use IndentFunc to style indents correctly
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
@@ -55,6 +55,9 @@ func (e *ParagraphElement) Finish(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: pw,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user