From 4f41ac3269994c90173e07a6bedfbaeaec9e7be8 Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Mon, 30 Mar 2020 15:03:29 -0400 Subject: Fix #6228 (#6230) UUID: Remove `getUUID`, fix `getRandomUUID` and make it polymorphic in PandocMonad. --- src/Text/Pandoc/Writers/EPUB.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 49f6cc41c..63034a577 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -50,7 +50,7 @@ import Text.Pandoc.Options (EPUBVersion (..), HTMLMathMethod (..), import Text.Pandoc.Shared (makeSections, normalizeDate, renderTags', safeRead, stringify, trim, uniqueIdent, tshow) import qualified Text.Pandoc.UTF8 as UTF8 -import Text.Pandoc.UUID (getUUID) +import Text.Pandoc.UUID (getRandomUUID) import Text.Pandoc.Walk (query, walk, walkM) import Text.Pandoc.Writers.HTML (writeHtmlStringForEPUB) import Text.Printf (printf) @@ -163,8 +163,8 @@ getEPUBMetadata opts meta = do let addIdentifier m = if null (epubIdentifier m) then do - randomId <- (show . getUUID) <$> lift P.newStdGen - return $ m{ epubIdentifier = [Identifier randomId Nothing] } + randomId <- getRandomUUID + return $ m{ epubIdentifier = [Identifier (show randomId) Nothing] } else return m let addLanguage m = if null (epubLanguage m) -- cgit v1.2.3