From cf4f2cfa3ee0e71632df971e154c7b926c39ba80 Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 26 Mar 2020 23:47:34 +0000 Subject: [PATCH] Fix internal server error on checkboxes (#10845) 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 5b16fa8e84e5..70f47e289eac 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")) } } }