mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-20 15:42:25 +00:00
Completely fix task-list checkbox styling (#10798)
Continuing on from #10668 this PR makes goldmark apply the task-list styling to task-lists.
This commit is contained in:
parent
c61b902538
commit
f036de5a94
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue