Decode style JSON into a typed struct

This commit is contained in:
Christian Muehlhaeuser
2019-12-13 03:04:48 +01:00
parent 219f21c4e7
commit 35342a2061
17 changed files with 184 additions and 249 deletions
+1 -2
View File
@@ -9,7 +9,7 @@ import (
type RenderContext struct {
options Options
style map[StyleType]ElementStyle
styles StyleConfig
blockStack *BlockStack
table *TableElement
@@ -20,7 +20,6 @@ type RenderContext struct {
func NewRenderContext(options Options) RenderContext {
return RenderContext{
options: options,
style: make(map[StyleType]ElementStyle),
blockStack: &BlockStack{},
table: &TableElement{},
stripper: bluemonday.StrictPolicy(),