git.iko.soy/typeable/pandoc
on master help sign in
Better fix for the problem with ghc 7.8.
commit8264ae2abe976184086a5a40c3d082f5e3e99ca5 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 18 Oct 2016, 16:25 (10 years ago) parent3747abf
1 file changed+3−1
src/Text/Pandoc/Readers/Org/Blocks.hs+3−1
src/Text/Pandoc/Readers/Org/Blocks.hs+3−1
@@ -288,7 +288,9 @@ blockAttributes = try $ do
288288 let kvAttrs = foldl' (appendValues "ATTR_HTML") Nothing kv
289289 let name = lookup "NAME" kv
290290 let label = lookup "LABEL" kv
291− caption' <- mapM (parseFromString inlines . (++ "\n")) caption
291+ caption' <- case caption of
292+ Nothing -> return Nothing
293+ Just s -> Just <$> parseFromString inlines (s ++ "\n")
292294 kvAttrs' <- parseFromString keyValues . (++ "\n") $ fromMaybe mempty kvAttrs
293295 return $ BlockAttributes
294296 { blockAttrName = name