aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/markup/markdown/goldmark.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/markup/markdown/goldmark.go b/modules/markup/markdown/goldmark.go
index a9475b58c5..5b16fa8e84 100644
--- a/modules/markup/markdown/goldmark.go
+++ b/modules/markup/markdown/goldmark.go
@@ -82,6 +82,12 @@ func (g *GiteaASTTransformer) Transform(node *ast.Document, reader text.Reader,
link = []byte("#user-content-" + string(link)[1:])
}
v.Destination = link
+ case *ast.List:
+ if v.HasChildren() && v.FirstChild().HasChildren() && v.FirstChild().FirstChild().HasChildren() {
+ if _, ok := v.FirstChild().FirstChild().FirstChild().(*east.TaskCheckBox); ok {
+ v.SetAttributeString("class", "task-list")
+ }
+ }
}
return ast.WalkContinue, nil
})