aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-22 22:49:38 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-22 22:49:38 -0700
commitfd34dcba851ad1567b8969676174fc03a3afb958 (patch)
treecae6623f2a01f9398ffdc7dfd84248a2c459d67c /src/Text
parent94405121abff5eb2ed8ddf7be5457a4dc6619d3b (diff)
downloadpandoc-fd34dcba851ad1567b8969676174fc03a3afb958.tar.gz
Changed default template naming scheme.
Instead of latex.template, we now have default.latex. An appropriate extension is added automatically if the value of `--template` has no extension. So, `pandoc --template=special -t latex` looks for `special.latex`, while `pandoc --template=special -t man` looks for `special.man`.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Templates.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs
index cad89f35f..8b966ca7a 100644
--- a/src/Text/Pandoc/Templates.hs
+++ b/src/Text/Pandoc/Templates.hs
@@ -85,7 +85,7 @@ getDefaultTemplate _ "native" = return $ Right ""
getDefaultTemplate user "odt" = getDefaultTemplate user "opendocument"
getDefaultTemplate user writer = do
let format = takeWhile (/='+') writer -- strip off "+lhs" if present
- let fname = "templates" </> format <.> "template"
+ let fname = "templates" </> "default" <.> format
E.try $ readDataFile user fname
data TemplateState = TemplateState Int [(String,String)]