From 1d3460c0b05ad94e412d04ed4891facc3d49deb2 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Tue, 23 Oct 2018 03:21:21 +0300 Subject: Muse writer: code cleanup --- src/Text/Pandoc/Writers/Muse.hs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index 34cc90104..4316ed36c 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -218,8 +218,7 @@ blockToMuse (BulletList items) = do -> Muse m Doc bulletListItemToMuse item = do modify $ \st -> st { stUseTags = False } - contents <- blockListToMuse item - return $ hang 2 "- " contents + hang 2 "- " <$> blockListToMuse item blockToMuse (DefinitionList items) = do contents <- mapM definitionListItemToMuse items -- ensure that sublists have preceding blank line @@ -231,9 +230,8 @@ blockToMuse (DefinitionList items) = do definitionListItemToMuse (label, defs) = do modify $ \st -> st { stUseTags = False } label' <- local (\env -> env { envOneLine = True, envAfterSpace = True }) $ inlineListToMuse' label - contents <- vcat <$> mapM descriptionToMuse defs let ind = offset label' - return $ hang ind (nowrap label') contents + hang ind (nowrap label') . vcat <$> mapM descriptionToMuse defs descriptionToMuse :: PandocMonad m => [Block] -> Muse m Doc -- cgit v1.2.3