aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/EPUB.hs
diff options
context:
space:
mode:
authorJoseph C. Sible <josephcsible@users.noreply.github.com>2020-03-30 15:03:29 -0400
committerGitHub <noreply@github.com>2020-03-30 12:03:29 -0700
commit4f41ac3269994c90173e07a6bedfbaeaec9e7be8 (patch)
treeb88ea2164cda5c24ea782615decf5df279bfa343 /src/Text/Pandoc/Writers/EPUB.hs
parenta465e2c059ceb7f58279e25b11159c8fd391bde7 (diff)
downloadpandoc-4f41ac3269994c90173e07a6bedfbaeaec9e7be8.tar.gz
Fix #6228 (#6230)
UUID: Remove `getUUID`, fix `getRandomUUID` and make it polymorphic in PandocMonad.
Diffstat (limited to 'src/Text/Pandoc/Writers/EPUB.hs')
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs6
1 files changed, 3 insertions, 3 deletions
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)