aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFélix Sipma <felix.sipma@no-log.org>2020-12-14 11:20:21 +0100
committerFélix Sipma <felix.sipma@no-log.org>2020-12-14 11:20:21 +0100
commit99321556991f7943e6f1f700483884d501d6c375 (patch)
tree367122b3e0d8ace3e1045eebf46df8cdb4575b80
parent287a8d0d99b68b90970a5e4484c87532cfb38e4c (diff)
Revert "atom: use 'source > updated' instead of 'updated' if available"HEADmaster
This reverts commit 287a8d0d99b68b90970a5e4484c87532cfb38e4c.
-rw-r--r--src/Atom.hs17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/Atom.hs b/src/Atom.hs
index 3f2f652..d5dcdad 100644
--- a/src/Atom.hs
+++ b/src/Atom.hs
@@ -36,25 +36,10 @@ parseUpdated :: MonadLogger m => Cursor -> m (Maybe UTCTime)
parseUpdated c = parseW3Rfc822 $ mconcat $ parseFieldContent "updated" c
parseEntryUpdated :: MonadLogger m => Cursor -> m (Maybe UTCTime)
-parseEntryUpdated c = do
- mu <- parseEntrySourceUpdated c
- case mu of
- Nothing -> parseEntryUpdated' c
- Just u -> return $ Just u
--- parseEntryUpdated = parseEntryUpdated'
-
-parseEntryUpdated' :: MonadLogger m => Cursor -> m (Maybe UTCTime)
-parseEntryUpdated' c = case parseFieldContent "updated" c of
+parseEntryUpdated c = case parseFieldContent "updated" c of
[] -> parseW3Rfc822 $ mconcat $ parseFieldContent "published" c
us -> parseW3Rfc822 $ mconcat us
--- | "source > updated" is useful for "planet" feeds, it is often more accurate
--- than "updated"
-parseEntrySourceUpdated :: MonadLogger m => Cursor -> m (Maybe UTCTime)
-parseEntrySourceUpdated c = case (c $/ localNameFilter "source" &/ localNameFilter "updated" &// content) of
- [] -> return Nothing
- us -> parseW3Rfc822 $ mconcat us
-
parseLink :: Cursor -> Link
parseLink c = do
let href = case mconcat $ c $| attribute "href" of