From 013a1647a7c78e92b12c2ae520699ef7a567029a Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Fri, 7 Feb 2020 02:10:09 -0500 Subject: Use traverse instead of reimplementing it (#6124) --- src/Text/Pandoc/Readers/Org/Blocks.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Readers/Org') diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs index dc7a26aca..8aceebc07 100644 --- a/src/Text/Pandoc/Readers/Org/Blocks.hs +++ b/src/Text/Pandoc/Readers/Org/Blocks.hs @@ -130,9 +130,7 @@ blockAttributes = try $ do let kvAttrs = foldl' (appendValues "ATTR_HTML") Nothing kv let name = lookup "NAME" kv let label = lookup "LABEL" kv - caption' <- case caption of - Nothing -> return Nothing - Just s -> Just <$> parseFromString inlines (s <> "\n") + caption' <- traverse (parseFromString inlines . (<> "\n")) caption kvAttrs' <- parseFromString keyValues . (<> "\n") $ fromMaybe mempty kvAttrs return BlockAttributes { blockAttrName = name -- cgit v1.2.3