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
+5 -8
View File
@@ -5,7 +5,6 @@ import (
"strings"
"github.com/microcosm-cc/bluemonday"
"github.com/muesli/termenv"
)
// RenderContext holds the current rendering options and state.
@@ -15,18 +14,16 @@ type RenderContext struct {
blockStack *BlockStack
table *TableElement
stripper *bluemonday.Policy
colorProfile termenv.Profile
stripper *bluemonday.Policy
}
// NewRenderContext returns a new RenderContext.
func NewRenderContext(options Options) RenderContext {
return RenderContext{
options: options,
blockStack: &BlockStack{},
table: &TableElement{},
stripper: bluemonday.StrictPolicy(),
colorProfile: termenv.ColorProfile(),
options: options,
blockStack: &BlockStack{},
table: &TableElement{},
stripper: bluemonday.StrictPolicy(),
}
}