mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 22:00:39 +00:00
Markdown task list improvements (#13952)
* Markdown task list improvements - Remove `.ui` class and wrappers to prevent fomantic from messing with it. - Change rendered HTML to match GitHub. - Add custom styling for the checkboxes. * fix unittest Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
287b594803
commit
41e8b834af
5 changed files with 60 additions and 16 deletions
|
@ -357,9 +357,9 @@ func (r *HTMLRenderer) renderTaskCheckBoxListItem(w util.BufWriter, source []byt
|
|||
}
|
||||
var err error
|
||||
if n.IsChecked {
|
||||
_, err = w.WriteString(`<span class="ui checked checkbox"><input type="checkbox" checked="" readonly="readonly"` + end + `<label>`)
|
||||
_, err = w.WriteString(`<input type="checkbox" disabled="" checked=""` + end)
|
||||
} else {
|
||||
_, err = w.WriteString(`<span class="ui checkbox"><input type="checkbox" readonly="readonly"` + end + `<label>`)
|
||||
_, err = w.WriteString(`<input type="checkbox" disabled=""` + end)
|
||||
}
|
||||
if err != nil {
|
||||
return ast.WalkStop, err
|
||||
|
@ -371,7 +371,7 @@ func (r *HTMLRenderer) renderTaskCheckBoxListItem(w util.BufWriter, source []byt
|
|||
}
|
||||
}
|
||||
} else {
|
||||
_, _ = w.WriteString("</label></span></li>\n")
|
||||
_, _ = w.WriteString("</li>\n")
|
||||
}
|
||||
return ast.WalkContinue, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue