git.iko.soy/typeable/pandoc
on master help sign in
Muse writer: rewrite noteToMuse without do
8837af8Alexander Krotov
src/Text/Pandoc/Writers/Muse.hs+4−4
@@ -282,10 +282,10 @@ noteToMuse :: PandocMonad m
282 => Int
282 => Int
283 -> [Block]
283 -> [Block]
284 -> Muse m Doc
284 -> Muse m Doc
285−noteToMuse num note = do
285+noteToMuse num note =
286− contents <- blockListToMuse note
286+ hang (length marker) (text marker) <$> blockListToMuse note
287+ where
287− let marker = "[" ++ show num ++ "] "
288+ marker = "[" ++ show num ++ "] "
288− return $ hang (length marker) (text marker) contents
289
289
290-- | Escape special characters for Muse.
290-- | Escape special characters for Muse.
291escapeString :: String -> String
291escapeString :: String -> String