aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornuew <code@nuew.net>2021-05-10 11:26:32 -0400
committerGitHub <noreply@github.com>2021-05-10 09:26:32 -0600
commitff7176de80726a5db4c4bc4c5a3296b2bcdab192 (patch)
tree4f771b0bcbbfd97500118fdfc2aacb7adc59ef62 /src
parentba4ec8c5c0d83ee68dd9cb26cdc9553a3374b1ab (diff)
downloadpandoc-ff7176de80726a5db4c4bc4c5a3296b2bcdab192.tar.gz
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.
Diffstat (limited to 'src')
-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 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]