diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2014-04-24 17:37:10 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2014-04-24 17:37:10 -0700 |
commit | cbeb3bb2132908b76e3a83e61ff99418ebdf83b4 (patch) | |
tree | 85c3e324e08c0d63bf5fc8ddcd30365edd1975a2 /src/Text/Pandoc/Writers | |
parent | aeec883e0ee560e0a7b83407c4ec14430985ff41 (diff) | |
download | pandoc-cbeb3bb2132908b76e3a83e61ff99418ebdf83b4.tar.gz |
EPUB writer: Fixed some idrefs to match changes in ids.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-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 9f10554a9..c39a7798d 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -440,7 +440,7 @@ writeEPUB opts doc@(Pandoc meta _) = do xs -> [("properties", unwords xs)]) $ () let chapterRefNode ent = unode "itemref" ! - [("idref", takeFileName $ eRelativePath ent)] $ () + [("idref", toId $ eRelativePath ent)] $ () let pictureNode ent = unode "item" ! [("id", toId $ eRelativePath ent), ("href", eRelativePath ent), @@ -488,8 +488,8 @@ writeEPUB opts doc@(Pandoc meta _) = do case epubCoverImage metadata of Nothing -> [] Just _ -> [ unode "itemref" ! - [("idref", "cover"),("linear","no")] $ () ] - ++ ((unode "itemref" ! [("idref", "title_page") + [("idref", "cover_xhtml"),("linear","no")] $ () ] + ++ ((unode "itemref" ! [("idref", "title_page_xhtml") ,("linear", if null (docTitle meta) then "no" else "yes")] $ ()) : |