Switch to goldmark parser

This commit is contained in:
Christian Muehlhaeuser
2019-12-13 03:00:45 +01:00
parent 30ed5cc5ef
commit 07f52dd42a
9 changed files with 397 additions and 256 deletions
+25
View File
@@ -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)
}