From 22b69b557ecd9a86caa8628b9a395bdd86b55035 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Fri, 19 Jan 2018 16:05:14 +0300 Subject: Muse reader: fix parsing of nested definition lists --- test/Tests/Readers/Muse.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'test/Tests') diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs index 6cadd45bc..c92b395ff 100644 --- a/test/Tests/Readers/Muse.hs +++ b/test/Tests/Readers/Muse.hs @@ -960,9 +960,19 @@ tests = definitionList [ ("Term1", [ para "This is a first definition\nAnd it has two lines;\nno, make that three."]) , ("Term2", [ para "This is a second definition"]) ]) - , "Nested definition list" =: + , "One-line nested definition list" =: " Foo :: bar :: baz" =?> definitionList [ ("Foo", [ definitionList [ ("bar", [ para "baz" ])]])] + , "Nested definition list" =: + T.unlines + [ " First :: Second :: Third" + , " Fourth :: Fifth :: Sixth" + , " Seventh :: Eighth" + ] =?> + definitionList [ ("First", [ definitionList [ ("Second", [ para "Third" ]), + ("Fourth", [ definitionList [ ("Fifth", [ para "Sixth"] ) ] ] ) ] ] ) + , ("Seventh", [ para "Eighth" ]) + ] , "Two blank lines separate definition lists" =: T.unlines [ " First :: list" -- cgit v1.2.3