mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-10-27 03:29:58 -04:00
Use IndentFunc to style indents correctly
This commit is contained in:
1 parent
ca06d9968c
commit
8bcc61ace1
3 files changed
+9
No files matched your search
@@ -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