aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-10-22 03:14:45 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-10-22 03:14:45 +0300
commitfe99001d9f2132f1208da51c4e5716f7b491902c (patch)
treec0d89fd2a2a85c301bd2fce957abf9cfa8f832c9 /src/Text
parent875e33ecf698396418d722d77f74cf07835058d2 (diff)
downloadpandoc-fe99001d9f2132f1208da51c4e5716f7b491902c.tar.gz
hlint Muse writer
Diffstat (limited to 'src/Text')
-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