aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-03-24 23:06:44 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-03-24 23:06:44 -0700
commitb6f75f60d6a33d85839f8bec09c044a766d2caaa (patch)
tree0e7750d82a1b2c1549d6e0420dcf2ff63a75bfb2 /src/Text
parentcb906e751212e89c838fd4e064141ebe66c09f4d (diff)
downloadpandoc-b6f75f60d6a33d85839f8bec09c044a766d2caaa.tar.gz
EPUB writer: Don't put blank title page in reading sequence.
Set linear="no" if no title block. Addresses #797.
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 e875a0649..f7385894b 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -242,7 +242,10 @@ writeEPUB opts doc@(Pandoc meta _) = do
Nothing -> []
Just _ -> [ unode "itemref" !
[("idref", "cover"),("linear","no")] $ () ]
- ++ ((unode "itemref" ! [("idref", "title_page"),("linear","yes")] $ ()) :
+ ++ ((unode "itemref" ! [("idref", "title_page")
+ ,("linear", case meta of
+ Meta [] [] [] -> "no"
+ _ -> "yes")] $ ()) :
(unode "itemref" ! [("idref", "nav")
,("linear", if writerTableOfContents opts
then "yes"