aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index 8571ac402..ea31169d7 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -206,9 +206,8 @@ blockToMuse (OrderedList (start, style, _) items) = do
=> String -- ^ marker for list item
-> [Block] -- ^ list item (list of blocks)
-> Muse m Doc
- orderedListItemToMuse marker item = do
- contents <- blockListToMuse item
- return $ hang (length marker + 1) (text marker <> space) contents
+ orderedListItemToMuse marker item = hang (length marker + 1) (text marker <> space)
+ <$> blockListToMuse item
blockToMuse (BulletList items) = do
contents <- mapM bulletListItemToMuse items
-- ensure that sublists have preceding blank line
@@ -271,8 +270,7 @@ blockToMuse (Table caption _ _ headers rows) = do
let makeRow sep = (" " <>) . hpipeBlocks sep . zipWith lblock widthsInChars
let head' = makeRow " || " headers'
let rowSeparator = if noHeaders then " | " else " | "
- rows'' <- mapM (\row -> do cols <- mapM blockListToMuse row
- return $ makeRow rowSeparator cols) rows
+ rows'' <- mapM (\row -> makeRow rowSeparator <$> mapM blockListToMuse row) rows
let body = vcat rows''
return $ (if noHeaders then empty else head')
$$ body