diff --git a/ansi/margin.go b/ansi/margin.go index f97f372..dee45d0 100644 --- a/ansi/margin.go +++ b/ansi/margin.go @@ -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, diff --git a/ansi/style.go b/ansi/style.go index 0c13205..519aa0f 100644 --- a/ansi/style.go +++ b/ansi/style.go @@ -31,8 +31,9 @@ type StyleTask struct { type StyleBlock struct { StylePrimitive - Indent *uint `json:"indent"` - Margin *uint `json:"margin"` + Indent *uint `json:"indent"` + IndentToken *string `json:"indent_token"` + Margin *uint `json:"margin"` } type StyleCodeBlock struct {