git.iko.soy/typeable/pandoc
on master help sign in
EPUB writer: Ensure unique ids for styleesheets in content.opf.
dd34471John MacFarlane
src/Text/Pandoc/Writers/EPUB.hs+3−3
@@ -656,11 +656,11 @@ pandocToEPUB version opts doc = do
656 ,("media-type","application/xhtml+xml")] ++
656 ,("media-type","application/xhtml+xml")] ++
657 [("properties","nav") | epub3 ]) $ ()
657 [("properties","nav") | epub3 ]) $ ()
658 ] ++
658 ] ++
659− [ unode "item" ! [("id","style"), ("href",fp)
659+ [ unode "item" ! [("id","stylesheet" ++ show n), ("href",fp)
660 ,("media-type","text/css")] $ () |
660 ,("media-type","text/css")] $ () |
661− fp <- map
661+ (n :: Int, fp) <- zip [1..] (map
662 (makeRelative epubSubdir . eRelativePath)
662 (makeRelative epubSubdir . eRelativePath)
663− stylesheetEntries ] ++
663+ stylesheetEntries) ] ++
664 map chapterNode (cpgEntry ++ (tpEntry : chapterEntries)) ++
664 map chapterNode (cpgEntry ++ (tpEntry : chapterEntries)) ++
665 (case cpicEntry of
665 (case cpicEntry of
666 [] -> []
666 [] -> []