aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-10-23 03:21:21 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-10-23 03:38:59 +0300
commit1d3460c0b05ad94e412d04ed4891facc3d49deb2 (patch)
treed807e6fa2408be68cdd547994379170fc66a8ee4 /src/Text/Pandoc
parent0c7ac0c862dada9250fb2ad3fbc749b9daddb5b0 (diff)
downloadpandoc-1d3460c0b05ad94e412d04ed4891facc3d49deb2.tar.gz
Muse writer: code cleanup
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs6
1 files changed, 2 insertions, 4 deletions
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