diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2022-03-10 13:31:02 -0800 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2022-03-10 13:31:02 -0800 |
| commit | a7d94dba43bee13f9d021760625d45c3b86c3229 (patch) | |
| tree | 3a58d90a83d4acafc25d9fc902514d8bd2f0e99d /src | |
| parent | 18c432024b0511e47f5a0991c1ba3902ab639e48 (diff) | |
Org reader: allow multiple `#+bibliography:`.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Readers/Org/Meta.hs | 4 |
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 |
