Undo the "Use fromRight" hlint hint.

This commit is contained in:
John MacFarlane 2020-12-30 16:04:09 -08:00
parent 419190213a
commit 0782d5882c
2 changed files with 5 additions and 2 deletions

View file

@ -104,5 +104,9 @@
- Text.Pandoc.Readers.Markdown
- Text.Pandoc.Readers.RST
# fromRight is only in base >= 4.10
- ignore:
name: "Use fromRight"
# Define some custom infix operators
# - fixity: infixr 3 ~^#^~

View file

@ -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)