From 9b38b69c947cae11948c9b363c223e27f34a4b25 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sun, 6 Feb 2011 08:59:51 -0800
Subject: [PATCH] Make --toc work in epub output.

---
 src/Text/Pandoc/Writers/EPUB.hs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index 33b8aa76a..c0cc815d4 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -276,6 +276,9 @@ pageTemplate = unlines
  , "$endfor$"
  , "$else$"
  , "<h1>$title$</h1>"
+ , "$if(toc)$"
+ , "$toc$"
+ , "$endif$"
  , "$body$"
  , "$endif$"
  , "</body>"