From ff7176de80726a5db4c4bc4c5a3296b2bcdab192 Mon Sep 17 00:00:00 2001 From: nuew Date: Mon, 10 May 2021 11:26:32 -0400 Subject: epub Writer: Fix belongs-to-collection XML id choice (#7267) The epub writer previously used the same XML id for both the book identifier and the epub collection. This causes an error on epubcheck. --- src/Text/Pandoc/Writers/EPUB.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 3f10cb437..3c092a2c1 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -991,12 +991,12 @@ metadataElement version md currentTime = showDateTimeISO8601 currentTime | version == EPUB3 ] belongsToCollectionNodes = maybe [] - (\belongsToCollection -> (unode "meta" ! [("property", "belongs-to-collection"), ("id", "epub-id-1")] $ belongsToCollection ) + (\belongsToCollection -> (unode "meta" ! [("property", "belongs-to-collection"), ("id", "epub-collection-1")] $ belongsToCollection ) : - [unode "meta" ! [("refines", "#epub-id-1"), ("property", "collection-type")] $ ("series" :: Text) ]) + [unode "meta" ! [("refines", "#epub-collection-1"), ("property", "collection-type")] $ ("series" :: Text) ]) (epubBelongsToCollection md)++ maybe [] - (\groupPosition -> [unode "meta" ! [("refines", "#epub-id-1"), ("property", "group-position")] $ groupPosition ]) + (\groupPosition -> [unode "meta" ! [("refines", "#epub-collection-1"), ("property", "group-position")] $ groupPosition ]) (epubGroupPosition md) dcTag n s = unode ("dc:" <> n) s dcTag' n s = [dcTag n s] -- cgit v1.2.3