@@ -356,7 +356,7 @@ metadataFromMeta opts meta = EPUBMetadata{
356356 (writerVariables opts))
357357 `mplus` (metaValueToString <$> lookupMeta "cover-image" meta)
358358 mCss = lookupMeta "css" meta <|> lookupMeta "stylesheet" meta
359− stylesheets = fromMaybe [] (metaValueToPaths <$> mCss) ++
359+ stylesheets = maybe [] metaValueToPaths mCss ++
360360 case lookupContext "css" (writerVariables opts) of
361361 Just xs -> map TS.unpack xs
362362 Nothing ->
@@ -659,8 +659,8 @@ pandocToEPUB version opts doc = do
659659 ("media-type", maybe "" TS.unpack $
660660 getMimeType $ eRelativePath ent)] $ ()
661661
662− let tocTitle = fromMaybe plainTitle $
663− metaValueToString <$> lookupMeta "toc-title" meta
662+ let tocTitle = maybe plainTitle
663+ metaValueToString $ lookupMeta "toc-title" meta
664664 uuid <- case epubIdentifier metadata of
665665 (x:_) -> return $ identifierText x -- use first identifier as UUID
666666 [] -> throwError $ PandocShouldNeverHappenError "epubIdentifier is null" -- shouldn't happen
@@ -1400,7 +1400,7 @@ relatorMap =
14001400 ]
14011401
14021402docTitle' :: Meta -> [Inline]
1403−docTitle' meta = fromMaybe [] $ go <$> lookupMeta "title" meta
1403+docTitle' meta = maybe [] go $ lookupMeta "title" meta
14041404 where go (MetaString s) = [Str s]
14051405 go (MetaInlines xs) = xs
14061406 go (MetaBlocks [Para xs]) = xs