From 96924df78ff296c9b970168f0277069858b1eff5 Mon Sep 17 00:00:00 2001 From: Marko Andjelic Date: Wed, 11 Feb 2026 03:50:42 +0000 Subject: [PATCH] compressed function rewrite --- app/EpubParser.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/EpubParser.hs b/app/EpubParser.hs index 68ab427..9b5480b 100644 --- a/app/EpubParser.hs +++ b/app/EpubParser.hs @@ -61,9 +61,7 @@ openEpub path = do getOpfPath :: Archive -> Maybe String getOpfPath arch = - case findEntryByPath "META-INF/container.xml" arch of - Nothing -> Nothing - Just entry -> getRootPath (TE.decodeUtf8 . B.toStrict $ fromEntry entry) + maybe Nothing (\e -> getRootPath (TE.decodeUtf8 . B.toStrict $ fromEntry e)) (findEntryByPath "META-INF/container.xml" arch) getRootPath :: T.Text -> Maybe String getRootPath rawhtml =