compressed function rewrite

This commit is contained in:
Marko Andjelic 2026-02-11 03:50:42 +00:00
commit 96924df78f

View file

@ -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 =