diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-01-14 10:12:33 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-01-14 10:13:08 -0800 |
commit | a1abb3eeea2321654a8450725ff6c0d1a18ee0c7 (patch) | |
tree | 5a48c7eff74e45738c59aafaee83cbd15c561bf9 /src/Text/Pandoc/ImageSize.hs | |
parent | 68b438b1b8a4fb56a79db020770cf71394fbc214 (diff) | |
download | pandoc-a1abb3eeea2321654a8450725ff6c0d1a18ee0c7.tar.gz |
Allow binary 0.5. Version bump to 1.12.3.1.
Diffstat (limited to 'src/Text/Pandoc/ImageSize.hs')
-rw-r--r-- | src/Text/Pandoc/ImageSize.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Text/Pandoc/ImageSize.hs b/src/Text/Pandoc/ImageSize.hs index d1aacff1c..14575244d 100644 --- a/src/Text/Pandoc/ImageSize.hs +++ b/src/Text/Pandoc/ImageSize.hs @@ -182,9 +182,12 @@ findJfifSize bs = do Nothing -> fail "Did not find length record" exifSize :: ByteString -> Maybe ImageSize -exifSize = -- runGet ((Just <$> exifHeader) `mplus` return Nothing) . - runGet (Just <$> exifHeader) . - BL.fromChunks . (:[]) +exifSize = runGet (Just <$> exifHeader) . BL.fromChunks . (:[]) +-- NOTE: It would be nicer to do +-- runGet ((Just <$> exifHeader) <|> return Nothing) +-- which would prevent pandoc from raising an error when an exif header can't +-- be parsed. But we only get an Alternative instance for Get in binary 0.6, +-- and binary 0.5 ships with ghc 7.6. exifHeader :: Get ImageSize exifHeader = do |