Problem: TODO and DONE are shown a normal text links

Solution: Replace TODO and DONE tags with checkboxes
This commit is contained in:
Peter Stuifzand 2022-01-15 16:31:47 +01:00
parent a8fb7f62ad
commit d22f3e123a

View File

@ -937,8 +937,16 @@ func renderLinks(pageText string, edit bool) string {
s = strings.TrimSuffix(s, "]]")
s = strings.TrimSpace(s)
if tag {
switch s {
case "TODO":
return fmt.Sprint(`[ ] `)
case "DONE":
return fmt.Sprint(`[X] `)
default:
return fmt.Sprintf(`<a href=%q class="tag">%s</a>`, cleanNameURL(s), s)
}
}
editPart := ""
if edit {
editPart = "edit/"