Implemented ordered lists
This commit is contained in:
parent
009f94c38b
commit
04e564fdf8
3 changed files with 40 additions and 5 deletions
|
@ -55,10 +55,19 @@ func TestLink(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestList(t *testing.T) {
|
||||
assert.Equal(t, markdown.Render("-"), "<p>-</p>")
|
||||
assert.Equal(t, markdown.Render("- "), "<ul><li></li></ul>")
|
||||
assert.Equal(t, markdown.Render("- Entry"), "<ul><li>Entry</li></ul>")
|
||||
assert.Equal(t, markdown.Render("- Entry 1\n- Entry 2"), "<ul><li>Entry 1</li><li>Entry 2</li></ul>")
|
||||
assert.Equal(t, markdown.Render("- Entry 1\n- Entry 2\n- Entry 3"), "<ul><li>Entry 1</li><li>Entry 2</li><li>Entry 3</li></ul>")
|
||||
assert.Equal(t, markdown.Render("-"), "<p>-</p>")
|
||||
}
|
||||
|
||||
func TestOrderedList(t *testing.T) {
|
||||
assert.Equal(t, markdown.Render("1"), "<p>1</p>")
|
||||
assert.Equal(t, markdown.Render("1."), "<ol><li></li></ol>")
|
||||
assert.Equal(t, markdown.Render("1. "), "<ol><li></li></ol>")
|
||||
assert.Equal(t, markdown.Render("1. Entry"), "<ol><li>Entry</li></ol>")
|
||||
assert.Equal(t, markdown.Render("999) Entry"), "<ol><li>Entry</li></ol>")
|
||||
assert.Equal(t, markdown.Render("1. Entry\n2. Entry"), "<ol><li>Entry</li><li>Entry</li></ol>")
|
||||
}
|
||||
|
||||
func TestTables(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue