From 5d89018512a1138236d139f7677b9e5e740f6b07 Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Fri, 1 Jan 2021 20:24:59 +1300 Subject: [PATCH] Bugfix: case for AppStream links had incompatible function signature. --- src/Links.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Links.hs b/src/Links.hs index 623fd2a..b49aa8c 100644 --- a/src/Links.hs +++ b/src/Links.hs @@ -56,9 +56,9 @@ extractEl path el@(Element (Name "details" _ _) _ childs) = extractNodes (0:path) childs -- Special case for showing Appstream metadata of compatible apps. -- Fallback for incompatible package manager UIs. -extractEl (Element "{https://specifications.freedesktop.org/metainfo/1.0}url" attrs childs) - | Just label <- attrs `M.lookup `"{https://specifications.freedesktop.org/metainfo/1.0}type", - Just url <- parseAbsoluteURI $ nodesText childs "" = [Link label "" url] +extractEl _ (Element "{https://specifications.freedesktop.org/metainfo/1.0}url" attrs childs) + | Just label <- "{https://specifications.freedesktop.org/metainfo/1.0}type" `M.lookup` attrs, + Just url <- parseAbsoluteURI $ unpack $ nodesText childs "" = [Link label "" url] extractEl path el@(Element _ _ children) = extractElAttr el "href" ++ extractElAttr el "longdesc" ++ -- 2.30.2