summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-03-10 13:31:02 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2022-03-10 13:31:02 -0800
commita7d94dba43bee13f9d021760625d45c3b86c3229 (patch)
tree3a58d90a83d4acafc25d9fc902514d8bd2f0e99d /src
parent18c432024b0511e47f5a0991c1ba3902ab639e48 (diff)
Org reader: allow multiple `#+bibliography:`.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Org/Meta.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Meta.hs b/src/Text/Pandoc/Readers/Org/Meta.hs
index 9da518c4a..934c97dc2 100644
--- a/src/Text/Pandoc/Readers/Org/Meta.hs
+++ b/src/Text/Pandoc/Readers/Org/Meta.hs
@@ -78,7 +78,7 @@ a ~~> b = (a, b)
keywordHandlers :: PandocMonad m => Map Text (OrgParser m ())
keywordHandlers = Map.fromList
[ "author" ~~> lineOfInlines `parseThen` collectLines "author"
- , "bibliography" ~~> fmap pure anyLine `parseThen` B.setMeta "bibliography"
+ , "bibliography" ~~> fmap pure anyLine `parseThen` collectAsList "bibliography"
, "creator" ~~> fmap pure anyLine `parseThen` B.setMeta "creator"
, "date" ~~> lineOfInlines `parseThen` B.setMeta "date"
, "description" ~~> lineOfInlines `parseThen` collectLines "description"
@@ -157,7 +157,7 @@ collectLines key value meta =
MetaBool _bool -> []
-- | Accumulate the result as a MetaList under the given key.
-collectAsList :: Text -> Inlines -> Meta -> Meta
+collectAsList :: B.ToMetaValue a => Text -> a -> Meta -> Meta
collectAsList key value meta =
let value' = metaListAppend meta (B.toMetaValue value)
in B.setMeta key value' meta