@@ -182,9 +182,12 @@ findJfifSize bs = do
182182 Nothing -> fail "Did not find length record"
183183
184184exifSize :: ByteString -> Maybe ImageSize
185−exifSize = -- runGet ((Just <$> exifHeader) `mplus` return Nothing) .
186− runGet (Just <$> exifHeader) .
187− BL.fromChunks . (:[])
185+exifSize = runGet (Just <$> exifHeader) . BL.fromChunks . (:[])
186+-- NOTE: It would be nicer to do
187+-- runGet ((Just <$> exifHeader) <|> return Nothing)
188+-- which would prevent pandoc from raising an error when an exif header can't
189+-- be parsed. But we only get an Alternative instance for Get in binary 0.6,
190+-- and binary 0.5 ships with ghc 7.6.
188191
189192exifHeader :: Get ImageSize
190193exifHeader = do