diff options
-rw-r--r-- | Setup.hs | 4 | ||||
-rw-r--r-- | templates/DefaultHeaders.hs | 8 | ||||
-rw-r--r-- | templates/headers/ConTeXt.header (renamed from templates/headers/ConTeXtHeader) | 0 | ||||
-rw-r--r-- | templates/headers/Docbook.header (renamed from templates/headers/DocbookHeader) | 0 | ||||
-rw-r--r-- | templates/headers/LaTeX.header (renamed from templates/headers/LaTeXHeader) | 0 | ||||
-rw-r--r-- | templates/headers/RTF.header (renamed from templates/headers/RTFHeader) | 0 | ||||
-rw-r--r-- | templates/headers/S5.header (renamed from templates/headers/S5Header) | 0 |
7 files changed, 6 insertions, 6 deletions
@@ -2,7 +2,7 @@ import Distribution.Simple import Distribution.Simple.Setup import Distribution.PackageDescription import Distribution.Simple.LocalBuildInfo -import System.FilePath (combine, joinPath, takeFileName) +import System.FilePath (combine, joinPath, takeFileName, takeExtension) import System.Directory (getDirectoryContents, removeFile, copyFile) import System.IO (readFile, writeFile) import Control.Monad (foldM) @@ -52,7 +52,7 @@ fillS5WriterTemplate = fillDefaultHeadersTemplate :: IO () fillDefaultHeadersTemplate = do files <- getDirectoryContents (combine "templates" "headers") >>= - return . map (combine "headers") . filter (\x -> not (x `elem` [".",".."])) + return . map (combine "headers") . filter (\x -> takeExtension x == ".header") fillTemplate files "DefaultHeaders.hs" "DefaultHeaders.hs" -- Post-clean: remove the files generated from templates. diff --git a/templates/DefaultHeaders.hs b/templates/DefaultHeaders.hs index df14c2d0c..e37609f82 100644 --- a/templates/DefaultHeaders.hs +++ b/templates/DefaultHeaders.hs @@ -37,16 +37,16 @@ module Text.Pandoc.DefaultHeaders ( import Text.Pandoc.Writers.S5 defaultLaTeXHeader :: String -defaultLaTeXHeader = @LaTeXHeader@ +defaultLaTeXHeader = @LaTeX.header@ defaultConTeXtHeader :: String -defaultConTeXtHeader = @ConTeXtHeader@ +defaultConTeXtHeader = @ConTeXt.header@ defaultDocbookHeader :: String -defaultDocbookHeader = @DocbookHeader@ +defaultDocbookHeader = @Docbook.header@ defaultS5Header :: String defaultS5Header = s5Meta ++ s5CSS ++ s5Javascript defaultRTFHeader :: String -defaultRTFHeader = @RTFHeader@ +defaultRTFHeader = @RTF.header@ diff --git a/templates/headers/ConTeXtHeader b/templates/headers/ConTeXt.header index d19b41c45..d19b41c45 100644 --- a/templates/headers/ConTeXtHeader +++ b/templates/headers/ConTeXt.header diff --git a/templates/headers/DocbookHeader b/templates/headers/Docbook.header index 7b26b2c73..7b26b2c73 100644 --- a/templates/headers/DocbookHeader +++ b/templates/headers/Docbook.header diff --git a/templates/headers/LaTeXHeader b/templates/headers/LaTeX.header index d891b5f63..d891b5f63 100644 --- a/templates/headers/LaTeXHeader +++ b/templates/headers/LaTeX.header diff --git a/templates/headers/RTFHeader b/templates/headers/RTF.header index b4368694b..b4368694b 100644 --- a/templates/headers/RTFHeader +++ b/templates/headers/RTF.header diff --git a/templates/headers/S5Header b/templates/headers/S5.header index ebb24ebe2..ebb24ebe2 100644 --- a/templates/headers/S5Header +++ b/templates/headers/S5.header |