]> source.dussan.org Git - gitea.git/commitdiff
Fix rendering of issue checkboxes (#1709)
authorEthan Koenig <etk39@cornell.edu>
Fri, 12 May 2017 07:52:45 +0000 (03:52 -0400)
committerBo-Yi Wu <appleboy.tw@gmail.com>
Fri, 12 May 2017 07:52:45 +0000 (15:52 +0800)
modules/markdown/markdown.go

index 8f68c5516cc8b75fd4a6e7a6eb8678628f0e7db1..1f890cc822377e53f03a097928e2c7fb43b0c819 100644 (file)
@@ -144,12 +144,12 @@ func (r *Renderer) ListItem(out *bytes.Buffer, text []byte, flags int) {
        }
        switch {
        case bytes.HasPrefix(text, []byte(prefix+"[ ] ")):
-               text = append([]byte(`<div class="ui fitted disabled checkbox"><input type="checkbox" disabled="disabled" /><label /></div>`), text[3+len(prefix):]...)
+               text = append([]byte(`<span class="ui fitted disabled checkbox"><input type="checkbox" disabled="disabled" /><label /></span>`), text[3+len(prefix):]...)
                if prefix != "" {
                        text = bytes.Replace(text, []byte(prefix), []byte{}, 1)
                }
        case bytes.HasPrefix(text, []byte(prefix+"[x] ")):
-               text = append([]byte(`<div class="ui checked fitted disabled checkbox"><input type="checkbox" checked="" disabled="disabled" /><label /></div>`), text[3+len(prefix):]...)
+               text = append([]byte(`<span class="ui checked fitted disabled checkbox"><input type="checkbox" checked="" disabled="disabled" /><label /></span>`), text[3+len(prefix):]...)
                if prefix != "" {
                        text = bytes.Replace(text, []byte(prefix), []byte{}, 1)
                }