Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix task list checkbox toggle to work with YAML front matter #25184

Merged
merged 7 commits into from
Jun 13, 2023
Prev Previous commit
Next Next commit
Fix to write directly instead of creating intermediate string
jtran committed Jun 12, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 164a8159cd38ebe5967474a96ceefc9284e3649e
2 changes: 1 addition & 1 deletion modules/markup/markdown/goldmark.go
Original file line number Diff line number Diff line change
@@ -462,7 +462,7 @@ func (r *HTMLRenderer) renderTaskCheckBoxListItem(w util.BufWriter, source []byt
} else {
_, _ = w.WriteString("<li>")
}
_, _ = w.WriteString(fmt.Sprintf(`<input type="checkbox" disabled="" data-source-position="%d"`, n.SourcePosition))
fmt.Fprintf(w, `<input type="checkbox" disabled="" data-source-position="%d"`, n.SourcePosition)
if n.IsChecked {
_, _ = w.WriteString(` checked=""`)
}