Missing date error fix

This commit is contained in:
Piotr Kopycki 2021-04-20 18:49:54 +02:00
parent 946f72833f
commit cf6ea155f4

View File

@ -31,7 +31,7 @@ toShadowItem (url, articleTitle) =
getDate articleTitle =
case articleTitle =~~ "(19[0-9][0-9]|20[0-9][0-9])" :: Maybe [[String]] of
Just [[_, year]] -> year
otherwise -> error $ "unexpected articleTitle: " ++ articleTitle
otherwise -> "No date for " ++ articleTitle
main = do