aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-04-23 09:48:50 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-04-23 09:48:50 -0700
commitdd344715f64039d00f57fb39519db7bc60a3c121 (patch)
treeb75d9617beb03da56b1fa6113d9d295dce225284 /src/Text/Pandoc
parent6699471484355d25a426b276f88e21311049fac5 (diff)
downloadpandoc-dd344715f64039d00f57fb39519db7bc60a3c121.tar.gz
EPUB writer: Ensure unique ids for styleesheets in content.opf.
Closes #5463.
Diffstat (limited to 'src/Text/Pandoc')
-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 f5e7da4b4..b0f6adecc 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -656,11 +656,11 @@ pandocToEPUB version opts doc = do
,("media-type","application/xhtml+xml")] ++
[("properties","nav") | epub3 ]) $ ()
] ++
- [ unode "item" ! [("id","style"), ("href",fp)
+ [ unode "item" ! [("id","stylesheet" ++ show n), ("href",fp)
,("media-type","text/css")] $ () |
- fp <- map
+ (n :: Int, fp) <- zip [1..] (map
(makeRelative epubSubdir . eRelativePath)
- stylesheetEntries ] ++
+ stylesheetEntries) ] ++
map chapterNode (cpgEntry ++ (tpEntry : chapterEntries)) ++
(case cpicEntry of
[] -> []