@@ -242,18 +242,17 @@ orderedListToOpenDocument o pn bs =
243orderedItemToOpenDocument :: PandocMonad m
243orderedItemToOpenDocument :: PandocMonad m
244 => WriterOptions -> Int -> [Block] -> OD m Doc
244 => WriterOptions -> Int -> [Block] -> OD m Doc
245−orderedItemToOpenDocument o n (b:bs)
245+orderedItemToOpenDocument o n bs = vcat <$> mapM go bs
246− | OrderedList a l <- b = go =<< newLevel a l
246+ where go (OrderedList a l) = newLevel a l
247− | Para l <- b = go =<< inParagraphTagsWithStyle ("P" ++ show n) <$> inlinesToOpenDocument o l
247+ go (Para l) = inParagraphTagsWithStyle ("P" ++ show n) <$>
248+ inlinesToOpenDocument o l
248− | otherwise = go =<< blockToOpenDocument o b
249+ go b = blockToOpenDocument o b
250− go i = ($$) i <$> orderedItemToOpenDocument o n bs
251− newLevel a l = do
250+ newLevel a l = do
252− nn <- length <$> gets stParaStyles
251+ nn <- length <$> gets stParaStyles
253− ls <- head <$> gets stListStyles
252+ ls <- head <$> gets stListStyles
254− modify $ \s -> s { stListStyles = orderedListLevelStyle a ls : tail (stListStyles s) }
253+ modify $ \s -> s { stListStyles = orderedListLevelStyle a ls :
254+ drop 1 (stListStyles s) }
255− inTagsIndented "text:list" <$> orderedListToOpenDocument o nn l
255+ inTagsIndented "text:list" <$> orderedListToOpenDocument o nn l
256−orderedItemToOpenDocument _ _ [] = return empty
258isTightList :: [[Block]] -> Bool
257isTightList :: [[Block]] -> Bool
259isTightList [] = False
258isTightList [] = False