diff --git a/block_test.go b/block_test.go
index ef078a8..b8903df 100644
--- a/block_test.go
+++ b/block_test.go
@@ -365,6 +365,111 @@ func TestUnorderedList(t *testing.T) {
"\n" +
"\n" +
"\n",
+
+ "* List\n extra indent, same paragraph\n",
+ "
\n- List\n extra indent, same paragraph
\n
\n",
+
+ "* List\n\n code block\n",
+ "\n",
+
+ "* List\n\n code block with spaces\n",
+ "\nList
\n\n code block with spaces\n
\n
\n",
+ }
+ doTestsBlock(t, tests, 0)
+}
+
+func TestOrderedList(t *testing.T) {
+ var tests = []string{
+ "1. Hello\n",
+ "\n- Hello
\n
\n",
+
+ "1. Yin\n2. Yang\n",
+ "\n- Yin
\n- Yang
\n
\n",
+
+ "1. Ting\n2. Bong\n3. Goo\n",
+ "\n- Ting
\n- Bong
\n- Goo
\n
\n",
+
+ "1. Yin\n\n2. Yang\n",
+ "\nYin
\nYang
\n
\n",
+
+ "1. Ting\n\n2. Bong\n3. Goo\n",
+ "\nTing
\nBong
\nGoo
\n
\n",
+
+ "1 Hello\n",
+ "1 Hello
\n",
+
+ "1.Hello\n",
+ "1.Hello
\n",
+
+ "1. Hello \n",
+ "\n- Hello
\n
\n",
+
+ "1. Hello \n Next line \n",
+ "\n- Hello\nNext line
\n
\n",
+
+ "Paragraph\n1. No linebreak\n",
+ "Paragraph\n1. No linebreak
\n",
+
+ "Paragraph\n\n1. Linebreak\n",
+ "Paragraph
\n\n\n- Linebreak
\n
\n",
+
+ "1. List\n 1. Nested list\n",
+ "\n- List\n\n
\n- Nested list
\n
\n
\n",
+
+ "1. List\n\n 1. Nested list\n",
+ "\nList
\n\n\n- Nested list
\n
\n
\n",
+
+ "1. List\n Second line\n\n 1. Nested\n",
+ "\nList\nSecond line
\n\n\n- Nested
\n
\n
\n",
+
+ "1. List\n 1. Nested\n\n Continued\n",
+ "\nList
\n\n\n- Nested
\n
\n\nContinued
\n
\n",
+
+ "1. List\n 1. shallow indent\n",
+ "\n- List\n\n
\n- shallow indent
\n
\n
\n",
+
+ "1. List\n" +
+ " 1. shallow indent\n" +
+ " 2. part of second list\n" +
+ " 3. still second\n" +
+ " 4. almost there\n" +
+ " 1. third level\n",
+ "\n" +
+ "- List\n\n" +
+ "
\n" +
+ "- shallow indent
\n" +
+ "- part of second list
\n" +
+ "- still second
\n" +
+ "- almost there\n\n" +
+ "
\n" +
+ "- third level
\n" +
+ "
\n" +
+ "
\n" +
+ "
\n",
+
+ "1. List\n extra indent, same paragraph\n",
+ "\n- List\n extra indent, same paragraph
\n
\n",
+
+ "1. List\n\n code block\n",
+ "\nList
\n\ncode block\n
\n
\n",
+
+ "1. List\n\n code block with spaces\n",
+ "\nList
\n\n code block with spaces\n
\n
\n",
+
+ "1. List\n * Mixted list\n",
+ "\n- List\n\n
\n
\n",
+
+ "1. List\n * Mixed list\n",
+ "\n- List\n\n
\n
\n",
+
+ "* Start with unordered\n 1. Ordered\n",
+ "\n- Start with unordered\n\n
\n- Ordered
\n
\n
\n",
+
+ "* Start with unordered\n 1. Ordered\n",
+ "\n- Start with unordered\n\n
\n- Ordered
\n
\n
\n",
+
+ "1. numbers\n1. are ignored\n",
+ "\n- numbers
\n- are ignored
\n
\n",
}
doTestsBlock(t, tests, 0)
}