Skip to content

Commit cf4f2cf

Browse files
authored
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 <[email protected]>
1 parent bbd910e commit cf4f2cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/markup/markdown/goldmark.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func (g *GiteaASTTransformer) Transform(node *ast.Document, reader text.Reader,
8585
case *ast.List:
8686
if v.HasChildren() && v.FirstChild().HasChildren() && v.FirstChild().FirstChild().HasChildren() {
8787
if _, ok := v.FirstChild().FirstChild().FirstChild().(*east.TaskCheckBox); ok {
88-
v.SetAttributeString("class", "task-list")
88+
v.SetAttributeString("class", []byte("task-list"))
8989
}
9090
}
9191
}

0 commit comments

Comments
 (0)