forked from marko/svitak
compressed function rewrite
This commit is contained in:
parent
0a43a51205
commit
96924df78f
1 changed files with 1 additions and 3 deletions
|
|
@ -61,9 +61,7 @@ openEpub path = do
|
||||||
|
|
||||||
getOpfPath :: Archive -> Maybe String
|
getOpfPath :: Archive -> Maybe String
|
||||||
getOpfPath arch =
|
getOpfPath arch =
|
||||||
case findEntryByPath "META-INF/container.xml" arch of
|
maybe Nothing (\e -> getRootPath (TE.decodeUtf8 . B.toStrict $ fromEntry e)) (findEntryByPath "META-INF/container.xml" arch)
|
||||||
Nothing -> Nothing
|
|
||||||
Just entry -> getRootPath (TE.decodeUtf8 . B.toStrict $ fromEntry entry)
|
|
||||||
|
|
||||||
getRootPath :: T.Text -> Maybe String
|
getRootPath :: T.Text -> Maybe String
|
||||||
getRootPath rawhtml =
|
getRootPath rawhtml =
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue