aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJoseph C. Sible <josephcsible@users.noreply.github.com>2020-02-07 02:10:09 -0500
committerGitHub <noreply@github.com>2020-02-06 23:10:09 -0800
commit013a1647a7c78e92b12c2ae520699ef7a567029a (patch)
tree5f5e91d37b1f166a0050540943867f5b51a952af /src/Text/Pandoc/Readers
parent30c8980883921e0672c36db2ad77ab31c147190c (diff)
downloadpandoc-013a1647a7c78e92b12c2ae520699ef7a567029a.tar.gz
Use traverse instead of reimplementing it (#6124)
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs4
1 files changed, 1 insertions, 3 deletions
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