summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:13:41 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2009-12-31 01:13:41 +0000
commit225f7dd4114bc13c17b70595eb8c79aeb3acb1da (patch)
tree141692928354ac85e05644ca3f8b1f8fc24a6991 /src/Text/Pandoc
parent2de39923c4211b9bbe591607c289d15140ae4ae3 (diff)
Got s5 writer working with html template.
s5 css and js is included using header-includes variable. We don't need a separate s5 template, so it has been removed. Use linebreak to separate authors in S5 title page. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1705 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Templates.hs1
-rw-r--r--src/Text/Pandoc/Writers/S5.hs4
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs
index de2991566..b8c70c569 100644
--- a/src/Text/Pandoc/Templates.hs
+++ b/src/Text/Pandoc/Templates.hs
@@ -55,6 +55,7 @@ import Text.Pandoc.Shared (readDataFile)
-- directory (~/.pandoc on unix) or from the cabal data directory.
getDefaultTemplate :: String -> IO (Either E.IOException String)
getDefaultTemplate "native" = return $ Right ""
+getDefaultTemplate "s5" = getDefaultTemplate "html"
getDefaultTemplate "odt" = getDefaultTemplate "opendocument"
getDefaultTemplate format = do
let format' = takeWhile (/='+') format -- strip off "+lhs" if present
diff --git a/src/Text/Pandoc/Writers/S5.hs b/src/Text/Pandoc/Writers/S5.hs
index c3acbfe71..e3e9e0024 100644
--- a/src/Text/Pandoc/Writers/S5.hs
+++ b/src/Text/Pandoc/Writers/S5.hs
@@ -43,8 +43,6 @@ import Text.Pandoc.Definition
import Text.XHtml.Strict
import System.FilePath ( (</>) )
import Data.List ( intercalate )
-import Prelude hiding (readFile)
-import System.IO.UTF8 (readFile)
s5HeaderIncludes :: IO String
s5HeaderIncludes = do
@@ -130,7 +128,7 @@ insertS5Structure (Pandoc (Meta title' authors date) blocks) =
let slides = insertSlides True blocks
firstSlide = if not (null title')
then [slideStart, (Header 1 title'),
- (Header 3 (intercalate [Str ",", Space] authors)),
+ (Header 3 (intercalate [LineBreak] authors)),
(Header 4 date), slideEnd]
else []
newBlocks = (layoutDiv title' date) ++ presentationStart:firstSlide ++