git.iko.soy/typeable/pandoc
on master help sign in
Use bind function instead of pattern matching
commit4417e33ea9d49a2001091adb4d2b19ebdefe5795 authorHubert Plociniczak <hubert.plociniczak@gmail.com> dateMon 17 Oct 2016, 16:58 (10 years ago) parent7234321
1 file changed+1−4
src/Text/Pandoc/Shared.hs+1−4
src/Text/Pandoc/Shared.hs+1−4
@@ -1039,10 +1039,7 @@ filteredFilesFromArchive zf f =
10391039 mapMaybe (fileAndBinary zf) (filter f (filesInArchive zf))
10401040 where
10411041 fileAndBinary :: Archive -> FilePath -> Maybe (FilePath, BL.ByteString)
1042− fileAndBinary a fp =
1043− case findEntryByPath fp a of
1044− Just e -> Just (fp, fromEntry e)
1045− Nothing -> Nothing
1042+ fileAndBinary a fp = findEntryByPath fp a >>= \e -> Just (fp, fromEntry e)
10461043
10471044---
10481045--- Squash blocks into inlines