aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-08-10 15:22:10 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-08-10 15:22:10 -0700
commit7a1ec21faac7d61782f1595b8bcc671139268e39 (patch)
treeb1f94f59ba94c9d3a6d64fc7ecb33c7b63cfaac7 /src/Text
parent0ae79275a980e158c3ac93df79ed33329150b7e0 (diff)
downloadpandoc-7a1ec21faac7d61782f1595b8bcc671139268e39.tar.gz
Avoid non-exhaustive pattern matches.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/ImageSize.hs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Text/Pandoc/ImageSize.hs b/src/Text/Pandoc/ImageSize.hs
index 43d4877a0..d57f66da5 100644
--- a/src/Text/Pandoc/ImageSize.hs
+++ b/src/Text/Pandoc/ImageSize.hs
@@ -544,10 +544,12 @@ exifHeader hdr = do
let resfactor = case lookup ResolutionUnit allentries of
Just (UnsignedShort 1) -> 100 / 254
_ -> 1
- let xres = maybe 72 (\(UnsignedRational x) -> floor $ x * resfactor)
- $ lookup XResolution allentries
- let yres = maybe 72 (\(UnsignedRational x) -> floor $ x * resfactor)
- $ lookup YResolution allentries
+ let xres = case lookup XResolution allentries of
+ Just (UnsignedRational x) -> floor (x * resfactor)
+ _ -> 72
+ let yres = case lookup YResolution allentries of
+ Just (UnsignedRational y) -> floor (y * resfactor)
+ _ -> 72
return ImageSize{
pxX = wdth
, pxY = hght