git.iko.soy/typeable/pandoc
on master help sign in
RTF writer: Fix build failure with ghc-8.6.1 caused by missing MonadFail instance.
commitf15c8d1ab48bd1bb0b3911468ce87a10fb88ce24 authorJonas Scholl <anselm.scholl@tu-harburg.de> dateMon 24 Sep 2018, 14:58 (8 years ago) parentcd610da
1 file changed+4−2
src/Text/Pandoc/Writers/RTF.hs+4−2
src/Text/Pandoc/Writers/RTF.hs+4−2
@@ -341,8 +341,10 @@ listItemToRTF :: PandocMonad m
341341listItemToRTF alignment indent marker [] = return $
342342 rtfCompact (indent + listIncrement) (negate listIncrement) alignment
343343 (marker ++ "\\tx" ++ show listIncrement ++ "\\tab ")
344−listItemToRTF alignment indent marker list = do
345− (first:rest) <- mapM (blockToRTF (indent + listIncrement) alignment) list
344+listItemToRTF alignment indent marker (listFirst:listRest) = do
345+ let f = blockToRTF (indent + listIncrement) alignment
346+ first <- f listFirst
347+ rest <- mapM f listRest
346348 let listMarker = "\\fi" ++ show (negate listIncrement) ++ " " ++ marker ++
347349 "\\tx" ++ show listIncrement ++ "\\tab"
348350 let insertListMarker ('\\':'f':'i':'-':d:xs) | isDigit d =