From 8264ae2abe976184086a5a40c3d082f5e3e99ca5 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 18 Oct 2016 16:25:13 +0200 Subject: Better fix for the problem with ghc 7.8. --- src/Text/Pandoc/Readers/Org/Blocks.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs index 9b549e3b3..61978f79f 100644 --- a/src/Text/Pandoc/Readers/Org/Blocks.hs +++ b/src/Text/Pandoc/Readers/Org/Blocks.hs @@ -288,7 +288,9 @@ blockAttributes = try $ do let kvAttrs = foldl' (appendValues "ATTR_HTML") Nothing kv let name = lookup "NAME" kv let label = lookup "LABEL" kv - caption' <- mapM (parseFromString inlines . (++ "\n")) caption + caption' <- case caption of + Nothing -> return Nothing + Just s -> Just <$> parseFromString inlines (s ++ "\n") kvAttrs' <- parseFromString keyValues . (++ "\n") $ fromMaybe mempty kvAttrs return $ BlockAttributes { blockAttrName = name -- cgit v1.2.3