From 18406117c7e9ae4817d51ffa06d6bd965a0c8419 Mon Sep 17 00:00:00 2001 From: Andrew Thornton Date: Thu, 26 Mar 2020 23:18:18 +0000 Subject: [PATCH] Fix internal server error on checkboxes Annoyingly goldmarks SetAttributeString requires that the value of the attribute is still a []byte but does not make it clear in the documentation. Signed-off-by: Andrew Thornton --- modules/markup/markdown/goldmark.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/markup/markdown/goldmark.go b/modules/markup/markdown/goldmark.go index 5b16fa8e84e50..70f47e289eac2 100644 --- a/modules/markup/markdown/goldmark.go +++ b/modules/markup/markdown/goldmark.go @@ -85,7 +85,7 @@ func (g *GiteaASTTransformer) Transform(node *ast.Document, reader text.Reader, 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") + v.SetAttributeString("class", []byte("task-list")) } } }