From dd344715f64039d00f57fb39519db7bc60a3c121 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 23 Apr 2019 09:48:50 -0700 Subject: EPUB writer: Ensure unique ids for styleesheets in content.opf. Closes #5463. --- src/Text/Pandoc/Writers/EPUB.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc') 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 [] -> [] -- cgit v1.2.3