@@ -600,16 +600,24 @@ addMetadataFromElement e = do
600600 Nothing -> return ()
601601 Just z -> addMetaField "author" z
602602 addMetaField "subtitle" e
603− addMetaField "author" e
603+ addAuthor e
604604 addMetaField "date" e
605605 addMetaField "release" e
606606 addMetaField "releaseinfo" e
607607 return mempty
608− where addMetaField fieldname elt =
609− case filterChildren (named fieldname) elt of
610− [] -> return ()
611− [z] -> getInlines z >>= addMeta fieldname
612− zs -> mapM getInlines zs >>= addMeta fieldname
608+ where
609+ addAuthor elt =
610+ case filterChildren (named "author") elt of
611+ [] -> return ()
612+ [z] -> fromAuthor z >>= addMeta "author"
613+ zs -> mapM fromAuthor zs >>= addMeta "author"
614+ fromAuthor elt =
615+ mconcat . intersperse space <$> mapM getInlines (elChildren elt)
616+ addMetaField fieldname elt =
617+ case filterChildren (named fieldname) elt of
618+ [] -> return ()
619+ [z] -> getInlines z >>= addMeta fieldname
620+ zs -> mapM getInlines zs >>= addMeta fieldname
613621
614622addMeta :: PandocMonad m => ToMetaValue a => Text -> a -> DB m ()
615623addMeta field val = modify (setMeta field val)