mirror of
https://github.com/rwinkhart/glamour-temp-MUTN.git
synced 2026-09-06 08:57:14 -04:00
Switch to goldmark parser
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package gold
|
||||
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
type CheckedItemElement struct {
|
||||
Checked bool
|
||||
}
|
||||
|
||||
func (e *CheckedItemElement) Render(w io.Writer, ctx RenderContext) error {
|
||||
var el *BaseElement
|
||||
|
||||
pre := "✗ "
|
||||
if e.Checked {
|
||||
pre = "✓ "
|
||||
}
|
||||
|
||||
el = &BaseElement{
|
||||
Prefix: pre,
|
||||
Style: ctx.style[CheckedItem],
|
||||
}
|
||||
|
||||
return el.Render(w, ctx)
|
||||
}
|
||||
Reference in New Issue
Block a user