git.iko.soy/typeable/pandoc
on master help sign in
DocBook reader: set "author" not "authors".
c99ecf6John MacFarlane
src/Text/Pandoc/Readers/DocBook.hs+3−3
@@ -576,8 +576,8 @@ addMeta :: ToMetaValue a => String -> a -> DB ()
576addMeta field val = modify (setMeta field val)
576addMeta field val = modify (setMeta field val)
577
577
578instance HasMeta DBState where
578instance HasMeta DBState where
579− setMeta str v s = s {dbMeta = setMeta str v (dbMeta s)}
579+ setMeta field v s = s {dbMeta = setMeta field v (dbMeta s)}
580−
580+ deleteMeta field s = s {dbMeta = deleteMeta field (dbMeta s)}
581
581
582isBlockElement :: Content -> Bool
582isBlockElement :: Content -> Bool
583isBlockElement (Elem e) = qName (elName e) `elem` blocktags
583isBlockElement (Elem e) = qName (elName e) `elem` blocktags
@@ -789,7 +789,7 @@ parseBlock (Elem e) =
789 Nothing -> return mempty
789 Nothing -> return mempty
790 addMeta "title" (tit <> subtit)
790 addMeta "title" (tit <> subtit)
791
791
792− getAuthor = (:[]) <$> getInlines e >>= addMeta "authors"
792+ getAuthor = (:[]) <$> getInlines e >>= addMeta "author"
793 getAuthorGroup = do
793 getAuthorGroup = do
794 let terms = filterChildren (named "author") e
794 let terms = filterChildren (named "author") e
795 mapM getInlines terms >>= addMeta "authors"
795 mapM getInlines terms >>= addMeta "authors"