From 0782d5882c8c04fbdffcb7026457b3cc79150692 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 30 Dec 2020 16:04:09 -0800 Subject: Undo the "Use fromRight" hlint hint. --- src/Text/Pandoc/Writers/Docx.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 1818ed81d..65946ec88 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -28,7 +28,6 @@ import Data.Char (isSpace, isLetter) import Data.List (intercalate, isPrefixOf, isSuffixOf) import Data.String (fromString) import qualified Data.Map as M -import Data.Either (fromRight) import Data.Maybe (fromMaybe, isNothing, mapMaybe, maybeToList) import qualified Data.Set as Set import qualified Data.Text as T @@ -1403,7 +1402,7 @@ inlineToOpenXML' opts (Image attr@(imgident, _, _) alt (src, title)) = do generateImgElt (ident, _, _, img) = let (xpt,ypt) = desiredSizeInPoints opts attr - (fromRight def (imageSize opts img)) + (either (const def) id (imageSize opts img)) -- 12700 emu = 1 pt (xemu,yemu) = fitToPage (xpt * 12700, ypt * 12700) (pageWidth * 12700) -- cgit v1.2.3