git.iko.soy/typeable/pandoc
on master help sign in
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.

commitff7176de80726a5db4c4bc4c5a3296b2bcdab192 authornuew <code@nuew.net> dateMon 10 May 2021, 11:26 (5 years ago) parentba4ec8c
1 file changed+3−3
src/Text/Pandoc/Writers/EPUB.hs+3−3
src/Text/Pandoc/Writers/EPUB.hs+3−3
@@ -991,12 +991,12 @@ metadataElement version md currentTime =
991991 showDateTimeISO8601 currentTime | version == EPUB3 ]
992992 belongsToCollectionNodes =
993993 maybe []
994− (\belongsToCollection -> (unode "meta" ! [("property", "belongs-to-collection"), ("id", "epub-id-1")] $ belongsToCollection )
994+ (\belongsToCollection -> (unode "meta" ! [("property", "belongs-to-collection"), ("id", "epub-collection-1")] $ belongsToCollection )
995995 :
996− [unode "meta" ! [("refines", "#epub-id-1"), ("property", "collection-type")] $ ("series" :: Text) ])
996+ [unode "meta" ! [("refines", "#epub-collection-1"), ("property", "collection-type")] $ ("series" :: Text) ])
997997 (epubBelongsToCollection md)++
998998 maybe []
999− (\groupPosition -> [unode "meta" ! [("refines", "#epub-id-1"), ("property", "group-position")] $ groupPosition ])
999+ (\groupPosition -> [unode "meta" ! [("refines", "#epub-collection-1"), ("property", "group-position")] $ groupPosition ])
10001000 (epubGroupPosition md)
10011001 dcTag n s = unode ("dc:" <> n) s
10021002 dcTag' n s = [dcTag n s]