diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-04-23 09:48:50 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-04-23 09:48:50 -0700 |
commit | dd344715f64039d00f57fb39519db7bc60a3c121 (patch) | |
tree | b75d9617beb03da56b1fa6113d9d295dce225284 /src | |
parent | 6699471484355d25a426b276f88e21311049fac5 (diff) | |
download | pandoc-dd344715f64039d00f57fb39519db7bc60a3c121.tar.gz |
EPUB writer: Ensure unique ids for styleesheets in content.opf.
Closes #5463.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/EPUB.hs | 6 |
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 [] -> [] |