瀏覽代碼

Fix rendering of issue checkboxes (#1709)

tags/v1.2.0-rc1
Ethan Koenig 7 年之前
父節點
當前提交
5ca3046da6
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      modules/markdown/markdown.go

+ 2
- 2
modules/markdown/markdown.go 查看文件

@@ -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)
}

Loading…
取消
儲存