git.iko.soy/typeable/pandoc
on master help sign in
DocBook reader: set "author" not "authors".
commitc99ecf6cc566a90eef1816eb5a1a1167b81ad9ac authorJohn MacFarlane <fiddlosopher@gmail.com> dateFri 4 Apr 2014, 21:33 (13 years ago) parent1b930a9
1 file changed+3−3
src/Text/Pandoc/Readers/DocBook.hs+3−3
src/Text/Pandoc/Readers/DocBook.hs+3−3
@@ -576,8 +576,8 @@ addMeta :: ToMetaValue a => String -> a -> DB ()
576576addMeta field val = modify (setMeta field val)
577577
578578instance HasMeta DBState where
579− setMeta str v s = s {dbMeta = setMeta str v (dbMeta s)}
580−
579+ setMeta field v s = s {dbMeta = setMeta field v (dbMeta s)}
580+ deleteMeta field s = s {dbMeta = deleteMeta field (dbMeta s)}
581581
582582isBlockElement :: Content -> Bool
583583isBlockElement (Elem e) = qName (elName e) `elem` blocktags
@@ -789,7 +789,7 @@ parseBlock (Elem e) =
789789 Nothing -> return mempty
790790 addMeta "title" (tit <> subtit)
791791
792− getAuthor = (:[]) <$> getInlines e >>= addMeta "authors"
792+ getAuthor = (:[]) <$> getInlines e >>= addMeta "author"
793793 getAuthorGroup = do
794794 let terms = filterChildren (named "author") e
795795 mapM getInlines terms >>= addMeta "authors"