aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-11-02 20:57:18 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-11-02 20:57:18 -0700
commit927e4b92a6c1ac10d80b587700b2b4dae9956328 (patch)
tree733676d0e534063d79c0bc4a33c604ade6bab8f8 /src/Text
parent927a9271a5b0d20fac9f869fbf19426e521c9be9 (diff)
downloadpandoc-927e4b92a6c1ac10d80b587700b2b4dae9956328.tar.gz
EPUB: Use HTML5 for epub3.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index 5d557824f..e9a8b3de7 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -99,6 +99,7 @@ writeEPUB version opts doc@(Pandoc meta _) = do
let coverImage = "cover-image" ++ takeExtension img
let cpContent = fromStringLazy $ writeHtmlString
opts'{writerTemplate = coverImageTemplate,
+ writerHtml5 = epub3,
writerVariables = ("coverimage",coverImage):vars}
(Pandoc meta [])
imgContent <- B.readFile img
@@ -108,6 +109,7 @@ writeEPUB version opts doc@(Pandoc meta _) = do
-- title page
let tpContent = fromStringLazy $ writeHtmlString
opts'{writerTemplate = titlePageTemplate,
+ writerHtml5 = epub3,
writerVariables = vars}
(Pandoc meta [])
let tpEntry = mkEntry "title_page.xhtml" tpContent
@@ -134,7 +136,8 @@ writeEPUB version opts doc@(Pandoc meta _) = do
-- so the next two lines fix that:
let reftable = correlateRefs blocks'
let blocks'' = replaceRefs reftable blocks'
- let tags = parseTags $ writeHtmlString opts'{writerStandalone = False}
+ let tags = parseTags $ writeHtmlString opts'{writerStandalone = False,
+ writerHtml5 = epub3}
$ Pandoc (Meta [] [] []) blocks''
let chunks = partitions (~== TagOpen "h1" []) tags