mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-03 07:27:19 -04:00
Use IndentWriter proxied by AnsiWriter
This commit is contained in:
+6
-4
@@ -30,19 +30,21 @@ func (e *DocumentElement) Finish(w io.Writer, node *bf.Node, tr *TermRenderer) e
|
||||
}
|
||||
|
||||
iw := &IndentWriter{
|
||||
Indent: indent,
|
||||
Forward: w,
|
||||
Indent: indent,
|
||||
Forward: &AnsiWriter{
|
||||
Forward: w,
|
||||
},
|
||||
}
|
||||
|
||||
_, err := iw.Write(tr.document.Bytes())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
tr.document.Reset()
|
||||
tr.blockStyle.Pop()
|
||||
|
||||
if suffix != "" {
|
||||
renderText(iw, rules, suffix)
|
||||
renderText(w, rules, suffix)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user