Use TrueColor color profile as default

Users can override the desired profile by calling WithColorProfile.
This commit is contained in:
Christian Muehlhaeuser
2020-02-10 14:28:08 +01:00
parent a2997cbe4a
commit 8d4e3f0692
12 changed files with 59 additions and 46 deletions
+2 -2
View File
@@ -29,7 +29,7 @@ func NewMarginWriter(ctx RenderContext, w io.Writer, rules StyleBlock) *MarginWr
}
pw := padding.NewWriterPipe(w, bs.Width(ctx), func(wr io.Writer) {
renderText(w, ctx.colorProfile, rules.StylePrimitive, " ")
renderText(w, ctx.options.ColorProfile, rules.StylePrimitive, " ")
})
ic := " "
@@ -37,7 +37,7 @@ func NewMarginWriter(ctx RenderContext, w io.Writer, rules StyleBlock) *MarginWr
ic = *rules.IndentToken
}
iw := indent.NewWriterPipe(pw, indentation+margin, func(wr io.Writer) {
renderText(w, ctx.colorProfile, bs.Parent().Style.StylePrimitive, ic)
renderText(w, ctx.options.ColorProfile, bs.Parent().Style.StylePrimitive, ic)
})
return &MarginWriter{