~ubuntu-branches/ubuntu/quantal/pandoc/quantal

« back to all changes in this revision

Viewing changes to src/Text/Pandoc/Templates.hs

  • Committer: Package Import Robot
  • Author(s): Clint Adams, Kiwamu Okabe, Jonas Smedegaard, Clint Adams
  • Date: 2012-03-04 20:35:25 UTC
  • mfrom: (3.1.12 sid)
  • Revision ID: package-import@ubuntu.com-20120304203525-9rr3xli9gxlefshr
Tags: 1.9.1.1-1
* New upstream release.

[ Kiwamu Okabe ]
* Allow DM uploads.
* New debian/watch file to scan pandoc 1.9
* Bump standards-version to 3.9.3.
* Move maintenance to Haskell team, with Jonas and Kiwamu as
  uploaders.
* Add new (build-)dependencies:
  + libghc-blaze-html-*
  + libghc-temporary-*
  + libghc-zlib-*
  Drop obsolete (build-)dependency:
  + libghc-deepseq-*
  Tighten build-dependencies:
  + libghc-http-dev
  + libghc-texmath-dev
  + libghc-pandoc-types-dev
  + libghc-json-dev
  + libghc-highlighting-kate-dev

[ Jonas Smedegaard ]
* Newline-delimit uploaders field.
* Update copyright file:
  + Extend copyright years.
  + Adapt a Files section.
  + Bump copyright format to final version 1.0.
* Update long descriptions:
  + Mention newly supported output formats:
    - Word Docx
    - AsciiDoc
    - DZSlides.
  + Explicitly mention output formats XHTML and HTML 5.
  + Explicitly mention out put (sub)format LaTeX beamer.
  + No longer mention markdown2pdf: Dropped upstream.

[ Clint Adams ]
* Move -doc build dependencies to Build-Depends-Indep.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
import Control.Monad (liftM, when, forM)
73
73
import System.FilePath
74
74
import Data.List (intercalate, intersperse)
75
 
import Text.XHtml (primHtml, Html)
 
75
import Text.Blaze (preEscapedString, Html)
76
76
import Data.ByteString.Lazy.UTF8 (ByteString, fromString)
77
77
import Text.Pandoc.Shared (readDataFile)
78
78
import qualified Control.Exception.Extensible as E (try, IOException)
82
82
                   -> String           -- ^ Name of writer 
83
83
                   -> IO (Either E.IOException String)
84
84
getDefaultTemplate _ "native" = return $ Right ""
 
85
getDefaultTemplate _ "json"   = return $ Right ""
 
86
getDefaultTemplate _ "docx"   = return $ Right ""
85
87
getDefaultTemplate user "odt" = getDefaultTemplate user "opendocument"
86
88
getDefaultTemplate user "epub" = getDefaultTemplate user "html"
87
89
getDefaultTemplate user writer = do
110
112
  toTarget = fromString
111
113
 
112
114
instance TemplateTarget Html where
113
 
  toTarget = primHtml
 
115
  toTarget = preEscapedString
114
116
 
115
117
-- | Renders a template 
116
118
renderTemplate :: TemplateTarget a