@@ -53,7 +53,7 @@ import Control.Monad
5353import Data.Bits
5454import Data.Binary
5555import Data.Binary.Get
56−import Text.Pandoc.Shared (safeRead, hush)
56+import Text.Pandoc.Shared (safeRead)
5757import Data.Default (Default)
5858import Numeric (showFFloat)
5959import Text.Pandoc.Definition
@@ -240,7 +240,7 @@ pngSize img = do
240240 ([w1,w2,w3,w4,h1,h2,h3,h4] :: [Integer]) -> return
241241 ((shift w1 24) + (shift w2 16) + (shift w3 8) + w4,
242242 (shift h1 24) + (shift h2 16) + (shift h3 8) + h4)
243− _ -> (hush . Left) "PNG parse error"
243+ _ -> Nothing -- "PNG parse error"
244244 let (dpix, dpiy) = findpHYs rest''
245245 return $ ImageSize { pxX = x, pxY = y, dpiX = dpix, dpiY = dpiy }
246246
@@ -269,7 +269,7 @@ gifSize img = do
269269 dpiX = 72,
270270 dpiY = 72
271271 }
272− _ -> (hush . Left) "GIF parse error"
272+ _ -> Nothing -- "GIF parse error"
273273
274274jpegSize :: ByteString -> Either String ImageSize
275275jpegSize img =