Skip to content

Commit

Permalink
EPUB writer: Don't put blank title page in reading sequence.
Browse files Browse the repository at this point in the history
Set linear="no" if no title block.
Addresses #797.
  • Loading branch information
John MacFarlane committed Mar 25, 2013
1 parent cb906e7 commit b6f75f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Text/Pandoc/Writers/EPUB.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit b6f75f6

Please sign in to comment.