git.iko.soy/typeable/pandoc
on master help sign in
EPUB writer: Ensure unique ids for styleesheets in content.opf.

Closes #5463.

commitdd344715f64039d00f57fb39519db7bc60a3c121 authorJohn MacFarlane <jgm@berkeley.edu> dateTue 23 Apr 2019, 09:48 (8 years ago) parent6699471
1 file changed+3−3
src/Text/Pandoc/Writers/EPUB.hs+3−3
src/Text/Pandoc/Writers/EPUB.hs+3−3
@@ -656,11 +656,11 @@ pandocToEPUB version opts doc = do
656656 ,("media-type","application/xhtml+xml")] ++
657657 [("properties","nav") | epub3 ]) $ ()
658658 ] ++
659− [ unode "item" ! [("id","style"), ("href",fp)
659+ [ unode "item" ! [("id","stylesheet" ++ show n), ("href",fp)
660660 ,("media-type","text/css")] $ () |
661− fp <- map
661+ (n :: Int, fp) <- zip [1..] (map
662662 (makeRelative epubSubdir . eRelativePath)
663− stylesheetEntries ] ++
663+ stylesheetEntries) ] ++
664664 map chapterNode (cpgEntry ++ (tpEntry : chapterEntries)) ++
665665 (case cpicEntry of
666666 [] -> []