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
+2 -2
View File
@@ -13,12 +13,12 @@ func (e *ItemElement) Render(w io.Writer, ctx RenderContext) error {
var el *BaseElement
if e.Enumeration > 0 {
el = &BaseElement{
Style: ctx.style[Enumeration],
Style: ctx.styles.Enumeration,
Prefix: strconv.FormatInt(int64(e.Enumeration), 10),
}
} else {
el = &BaseElement{
Style: ctx.style[Item],
Style: ctx.styles.Item,
}
}