summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-01-14 10:12:33 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-01-14 10:13:08 -0800
commita1abb3eeea2321654a8450725ff6c0d1a18ee0c7 (patch)
tree5a48c7eff74e45738c59aafaee83cbd15c561bf9
parent68b438b1b8a4fb56a79db020770cf71394fbc214 (diff)
Allow binary 0.5. Version bump to 1.12.3.1.
-rw-r--r--changelog4
-rw-r--r--pandoc.cabal4
-rw-r--r--src/Text/Pandoc/ImageSize.hs9
3 files changed, 12 insertions, 5 deletions
diff --git a/changelog b/changelog
index 4cbc60388..fde6873ec 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,7 @@
+pandoc (1.12.3.1)
+
+ * Relaxed version constraint on binary, allowing the use of binary 0.5.
+
pandoc (1.12.3)
* The `--bibliography` option now sets the `biblio-files` variable.
diff --git a/pandoc.cabal b/pandoc.cabal
index c8ff9738a..0199996be 100644
--- a/pandoc.cabal
+++ b/pandoc.cabal
@@ -1,5 +1,5 @@
Name: pandoc
-Version: 1.12.3
+Version: 1.12.3.1
Cabal-Version: >= 1.10
Build-Type: Custom
License: GPL
@@ -233,7 +233,7 @@ Library
yaml >= 0.8.3 && < 0.9,
vector >= 0.10 && < 0.11,
hslua >= 0.3 && < 0.4,
- binary >= 0.6 && < 0.8
+ binary >= 0.5 && < 0.8
Build-Tools: alex, happy
if flag(http-conduit)
Build-Depends: http-conduit >= 1.9 && < 2.1,
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