aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Powerpoint
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-03-19 10:30:32 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-03-19 10:30:32 -0700
commit8d5116381b20442bb3fa58dac1ef7d44db618823 (patch)
tree1d3b4f4d7b5f50819529a7c12f7df6147f3e6465 /src/Text/Pandoc/Writers/Powerpoint
parenta31731b8e2825c5bc8d7fcc9a61ce92b9d28d040 (diff)
downloadpandoc-8d5116381b20442bb3fa58dac1ef7d44db618823.tar.gz
Use NonEmpty instead of minimumDef.
Diffstat (limited to 'src/Text/Pandoc/Writers/Powerpoint')
-rw-r--r--src/Text/Pandoc/Writers/Powerpoint/Output.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs
index b26a7ff3e..4dbf32c4e 100644
--- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs
+++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs
@@ -50,7 +50,7 @@ import Text.Pandoc.Writers.Math (convertMath)
import Text.Pandoc.Writers.Powerpoint.Presentation
import Text.Pandoc.Shared (tshow)
import Skylighting (fromColor)
-import Safe (minimumDef)
+import Data.List.NonEmpty (nonEmpty)
-- |The 'EMU' type is used to specify sizes in English Metric Units.
type EMU = Integer
@@ -1428,7 +1428,8 @@ presentationToRels pres@(Presentation _ slides) = do
-- all relWithoutSlide rels (unless they're 1)
-- 3. If we have a notesmaster slide, we make space for that as well.
- let minRelNotOne = minimumDef 0 $ filter (1 <) $ map relId relsWeKeep
+ let minRelNotOne = maybe 0 minimum $ nonEmpty
+ $ filter (1 <) $ map relId relsWeKeep
modifyRelNum :: Int -> Int
modifyRelNum 1 = 1