mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-05 16:37:19 -04:00
Decode style JSON into a typed struct
This commit is contained in:
+3
-3
@@ -11,14 +11,14 @@ type CheckedItemElement struct {
|
||||
func (e *CheckedItemElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
var el *BaseElement
|
||||
|
||||
pre := "✗ "
|
||||
pre := ctx.styles.Task.Unticked
|
||||
if e.Checked {
|
||||
pre = "✓ "
|
||||
pre = ctx.styles.Task.Ticked
|
||||
}
|
||||
|
||||
el = &BaseElement{
|
||||
Prefix: pre,
|
||||
Style: ctx.style[CheckedItem],
|
||||
Style: ctx.styles.Task.StylePrimitive,
|
||||
}
|
||||
|
||||
return el.Render(w, ctx)
|
||||
|
||||
Reference in New Issue
Block a user