Org reader: allow multiple #+bibliography:
.
This commit is contained in:
parent
18c432024b
commit
a7d94dba43
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue