mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 16:37:19 -04:00
Let style define the indentation token
This commit is contained in:
+6
-1
@@ -35,10 +35,15 @@ func NewMarginWriter(ctx RenderContext, w io.Writer, rules StyleBlock) *MarginWr
|
||||
Forward: w,
|
||||
},
|
||||
}
|
||||
|
||||
ic := " "
|
||||
if rules.IndentToken != nil {
|
||||
ic = *rules.IndentToken
|
||||
}
|
||||
iw := &indent.Writer{
|
||||
Indent: indentation + margin,
|
||||
IndentFunc: func(wr io.Writer) {
|
||||
renderText(w, bs.Parent().Style.StylePrimitive, " ")
|
||||
renderText(w, bs.Parent().Style.StylePrimitive, ic)
|
||||
},
|
||||
Forward: &ansi.Writer{
|
||||
Forward: pw,
|
||||
|
||||
Reference in New Issue
Block a user