Commit 9f6bc429c2342d61fb7c1ca5341cdc972ff95a77 Parent: 74abc740f4b15693885e230b3fe059f55333edb8 Author: mcol <mcol@posteo.net> Date: 2021-09-21 23:14:40 +0100 Committer: mcol <mcol@posteo.net> Committed: 2021-09-21 23:14:40 +0100 Return empty description if absent
src/Repositories.hs Modified
@@ -62,8 +62,8 @@ --mconcat $ runGingerT (makeContextHtmlM (scopeLookup context) (putStr . unpack . htmlSource)) tpl -getDescription :: FilePath -> IO (Maybe String) +getDescription :: FilePath -> IO String getDescription path = tryIOError (readFile path) >>= \e -> case e of - Right contents -> return $ Just contents - Left err -> return Nothing + Right contents -> return contents + Left err -> return ""