aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-10-18 16:25:13 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2016-10-18 16:25:13 +0200
commit8264ae2abe976184086a5a40c3d082f5e3e99ca5 (patch)
tree52fada5a4588021e306657a79ee3c47e661cee4d /src/Text/Pandoc/Readers
parent3747abf02947beeab00b8d76def538e224ecd7f7 (diff)
downloadpandoc-8264ae2abe976184086a5a40c3d082f5e3e99ca5.tar.gz
Better fix for the problem with ghc 7.8.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs4
1 files changed, 3 insertions, 1 deletions
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