@@ -93,6 +93,79 @@ tests = [ testGroup "block elements"
9393 , " third definition :: third description"
9494 ]
9595 ]
96+ -- Test that lists of the same type and style are separated with two blanklines
97+ , testGroup "sequential lists"
98+ [ "bullet lists" =:
99+ bulletList [ para $ text "First"
100+ , para $ text "Second"
101+ , para $ text "Third"
102+ ] <>
103+ bulletList [ para $ text "Fourth"
104+ , para $ text "Fifth"
105+ ] =?>
106+ unlines [ " - First"
107+ , " - Second"
108+ , " - Third"
109+ , ""
110+ , ""
111+ , " - Fourth"
112+ , " - Fifth"
113+ ]
114+ , "ordered lists of the same style" =:
115+ orderedListWith (1, UpperRoman, DefaultDelim) [ para $ text "First"
116+ , para $ text "Second"
117+ ] <>
118+ orderedListWith (1, UpperRoman, DefaultDelim) [ para $ text "Third"
119+ , para $ text "Fourth"
120+ ] =?>
121+ unlines [ " I. First"
122+ , " II. Second"
123+ , ""
124+ , ""
125+ , " I. Third"
126+ , " II. Fourth"
127+ ]
128+ , "ordered lists with equal styles" =:
129+ orderedList [ para $ text "First"
130+ , para $ text "Second"
131+ ] <>
132+ orderedListWith (1, Decimal, DefaultDelim) [ para $ text "Third"
133+ , para $ text "Fourth"
134+ ] =?>
135+ unlines [ " 1. First"
136+ , " 2. Second"
137+ , ""
138+ , ""
139+ , " 1. Third"
140+ , " 2. Fourth"
141+ ]
142+ , "bullet and ordered lists" =:
143+ bulletList [ para $ text "First"
144+ , para $ text "Second"
145+ ] <>
146+ orderedListWith (1, UpperRoman, DefaultDelim) [ para $ text "Third"
147+ , para $ text "Fourth"
148+ ] =?>
149+ unlines [ " - First"
150+ , " - Second"
151+ , ""
152+ , " I. Third"
153+ , " II. Fourth"
154+ ]
155+ , "different style ordered lists" =:
156+ orderedListWith (1, UpperRoman, DefaultDelim) [ para $ text "First"
157+ , para $ text "Second"
158+ ] <>
159+ orderedListWith (1, Decimal, DefaultDelim) [ para $ text "Third"
160+ , para $ text "Fourth"
161+ ] =?>
162+ unlines [ " I. First"
163+ , " II. Second"
164+ , ""
165+ , " 1. Third"
166+ , " 2. Fourth"
167+ ]
168+ ]
96169 , testGroup "nested lists"
97170 [ "nested ordered list" =: orderedList [ plain $ text "First outer"
98171 , plain (text "Second outer:") <>