@@ 60,9 60,15 @@ extractEl _ (Element "{https://specifications.freedesktop.org/metainfo/1.0}url"
| Just label <- "{https://specifications.freedesktop.org/metainfo/1.0}type" `M.lookup` attrs,
Just url <- parseAbsoluteURI $ unpack $ nodesText childs "" = [Link label "" url]
extractEl _ el@(Element _ attrs [])
- | Just "alternae" <- "rel" `M.lookup` attrs', Just typ <- "type" `M.lookup` attrs',
+ | Just "alternate" <- "rel" `M.lookup` attrs', Just typ <- "type" `M.lookup` attrs',
Just val <- "href" `M.lookup` attrs', Just uri <- parseURIReference $ unpack val =
- let Application name _ title _ = mimeInfoCached $ unpack typ
+ let Application name _ title _ = mimeInfo $ unpack typ
+ in [Link (pack name) (pack title) uri]
+ where attrs' = M.mapKeys nameLocalName attrs
+extractEl _ el@(Element (Name "link" _ _) attrs [])
+ | Just "stylesheet" <- "rel" `M.lookup` attrs', Nothing <- "title" `M.lookup` attrs',
+ Just val <- "href" `M.lookup` attrs', Just uri <- parseURIReference $ unpack val =
+ let Application name _ title _ = mimeInfo "text/css"
in [Link (pack name) (pack title) uri]
where attrs' = M.mapKeys nameLocalName attrs
extractEl path el@(Element _ _ children) =