EPUB writer: Ensure unique ids for styleesheets in content.opf.

Closes #5463.
This commit is contained in:
John MacFarlane 2019-04-23 09:48:50 -07:00
parent 6699471484
commit dd344715f6

View file

@ -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
[] -> []