diff --git a/modules/markup/markdown/markdown_test.go b/modules/markup/markdown/markdown_test.go
index f9306b99a2..7c13494a67 100644
--- a/modules/markup/markdown/markdown_test.go
+++ b/modules/markup/markdown/markdown_test.go
@@ -882,6 +882,27 @@ foo: bar
}
}
+func TestRenderCheckList(t *testing.T) {
+ input := `- [ ] a
+- [x] b
+1. [x] a
+2. [ ] b
+5. [ ] e`
+ expected := `
+
+- a
+- b
+- e
+
+`
+ res, err := markdown.RenderString(&markup.RenderContext{Ctx: git.DefaultContext}, input)
+ require.NoError(t, err)
+ assert.Equal(t, template.HTML(expected), res)
+}
+
func TestRenderLinks(t *testing.T) {
input := ` space @mention-user${SPACE}${SPACE}
/just/a/path.bin
diff --git a/web_src/css/markup/content.css b/web_src/css/markup/content.css
index 8a872f2623..b22df9a402 100644
--- a/web_src/css/markup/content.css
+++ b/web_src/css/markup/content.css
@@ -153,7 +153,7 @@
list-style-type: none;
}
-.markup .task-list-item {
+.markup ul .task-list-item {
list-style-type: none;
}
@@ -162,11 +162,14 @@
}
.markup .task-list-item input[type="checkbox"] {
- margin: 0 .3em .25em -1.4em;
- vertical-align: middle;
+ margin: 0 .4em .25em -1.4em;
padding: 0;
}
+.markup ol .task-list-item input[type="checkbox"] {
+ margin-left: 0;
+}
+
.markup .task-list-item input[type="checkbox"] + p {
margin-left: -0.2em;
display: inline;