From 5e2754f515c954e6c2d2aaa387ea800ed55a9775 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Mon, 30 Jan 2017 10:19:30 +0100
Subject: [PATCH] Make epub an alias for epub3, not epub2.

---
 MANUAL.txt                   | 4 ++--
 src/Text/Pandoc.hs           | 2 +-
 src/Text/Pandoc/Templates.hs | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/MANUAL.txt b/MANUAL.txt
index 8cb4803cf..c773f2336 100644
--- a/MANUAL.txt
+++ b/MANUAL.txt
@@ -281,8 +281,8 @@ General options
     `texinfo` (GNU Texinfo), `opml` (OPML), `docbook` or `docbook4`
     (DocBook 4), `docbook5` (DocBook 5), `opendocument` (OpenDocument),
     `odt` (OpenOffice text document), `docx` (Word docx), `haddock`
-    (Haddock markup), `rtf` (rich text format), `epub` or `epub2` (EPUB v2
-    book), `epub3` (EPUB v3), `fb2` (FictionBook2 e-book),
+    (Haddock markup), `rtf` (rich text format), `epub2` (EPUB v2 book),
+    `epub` or `epub3` (EPUB v3), `fb2` (FictionBook2 e-book),
     `asciidoc` (AsciiDoc), `icml` (InDesign ICML), `tei` (TEI
     Simple), `slidy` (Slidy HTML and JavaScript slide show),
     `slideous` (Slideous HTML and JavaScript slide show),
diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs
index 3d28dbfb9..3b7c8f94d 100644
--- a/src/Text/Pandoc.hs
+++ b/src/Text/Pandoc.hs
@@ -261,7 +261,7 @@ writers = [
   ,("json"         , StringWriter $ \o d -> return $ writeJSON o d)
   ,("docx"         , ByteStringWriter writeDocx)
   ,("odt"          , ByteStringWriter writeODT)
-  ,("epub"         , ByteStringWriter writeEPUB2)
+  ,("epub"         , ByteStringWriter writeEPUB3)
   ,("epub2"        , ByteStringWriter writeEPUB2)
   ,("epub3"        , ByteStringWriter writeEPUB3)
   ,("fb2"          , StringWriter writeFB2)
diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs
index ddb073409..705ac54c9 100644
--- a/src/Text/Pandoc/Templates.hs
+++ b/src/Text/Pandoc/Templates.hs
@@ -62,7 +62,7 @@ getDefaultTemplate user writer = do
        "odt"     -> getDefaultTemplate user "opendocument"
        "html"    -> getDefaultTemplate user "html5"
        "docbook" -> getDefaultTemplate user "docbook5"
-       "epub"    -> getDefaultTemplate user "epub2"
+       "epub"    -> getDefaultTemplate user "epub3"
        "markdown_strict"   -> getDefaultTemplate user "markdown"
        "multimarkdown"     -> getDefaultTemplate user "markdown"
        "markdown_github"   -> getDefaultTemplate user "markdown"