, PageLink (Just "Bar") Nothing Nothing
]
]))
+
+ , (parseWiki " foo"
+ ~?=
+ (Right [ LeadingSpaced [ Text "foo" ] ]))
+
+ , (parseWiki " foo\n bar\n"
+ ~?=
+ (Right [ LeadingSpaced [ Text "foo"
+ , Text "\n"
+ , Text " bar"
+ ]
+ ]))
+
+ , (parseWiki "foo\n bar\nbaz"
+ ~?=
+ (Right [ Paragraph [ Text "foo" ]
+ , LeadingSpaced [ Text "bar" ]
+ , Paragraph [ Text "baz" ]
+ ]))
+
+ , (parseWiki "----"
+ ~?=
+ (Right [ HorizontalLine ]))
+
+ , (parseWiki "\nfoo\nbar\n----\n"
+ ~?=
+ (Right [ Paragraph [ Text "foo"
+ , Text "\n"
+ , Text "bar"
+ ]
+ , HorizontalLine
+ ]))
+
+ , (parseWiki "a----b"
+ ~?=
+ (Right [ Paragraph [ Text "a----b" ] ]))
+
+ , (parseWiki "* a"
+ ~?=
+ (Right [ List (ListElement Bullet [[Right (Text "a")]]) ]))
+
+ , (parseWiki "* a*"
+ ~?=
+ (Right [ List (ListElement Bullet [[Right (Text "a*")]]) ]))
+
+ , (parseWiki "* a\n* b\n"
+ ~?=
+ (Right [ List (ListElement Bullet [ [Right (Text "a")]
+ , [Right (Text "b")]
+ ])
+ ]))
+
+ , (parseWiki "*a\n*#b\n*#c\n"
+ ~?=
+ (Right [ List (ListElement Bullet [ [ Right (Text "a")
+ , Left (ListElement Numbered [ [Right (Text "b")]
+ , [Right (Text "c")]
+ ])
+ ]
+ ])
+ ]))
+
+ , (parseWiki "*a\n#b"
+ ~?=
+ (Right [ List (ListElement Bullet [ [Right (Text "a")] ])
+ , List (ListElement Numbered [ [Right (Text "b")] ])
+ ]))
]