diff options
author | John MacFarlane <jgm@berkeley.edu> | 2012-04-24 14:40:08 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2012-04-24 14:40:08 -0700 |
commit | a0fa8f92f1eb1e2678f1d1e1bd9f86d6a1bfa9d5 (patch) | |
tree | b8a5a5940e2399e5dce070cee51cf0ee984786b1 /src/Text | |
parent | 869ff4344202e29ae852067c8caebb8bc2abb3ae (diff) | |
parent | 471d4dc5022599edfaf234682c6e8dfe0b87f7c0 (diff) | |
download | pandoc-a0fa8f92f1eb1e2678f1d1e1bd9f86d6a1bfa9d5.tar.gz |
Merge pull request #496 from markwright/master
changes for blaze-html 0.5
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Templates.hs | 7 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs index 336efe453..dfdcd8e63 100644 --- a/src/Text/Pandoc/Templates.hs +++ b/src/Text/Pandoc/Templates.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} +{-# LANGUAGE TypeSynonymInstances, FlexibleInstances, CPP #-} {- Copyright (C) 2009-2010 John MacFarlane <jgm@berkeley.edu> @@ -72,7 +72,12 @@ import Text.ParserCombinators.Parsec import Control.Monad (liftM, when, forM) import System.FilePath import Data.List (intercalate, intersperse) +#if MIN_VERSION_blaze_html(0,5,0) +import Text.Blaze.Html (Html) +import Text.Blaze.Internal (preEscapedString) +#else import Text.Blaze (preEscapedString, Html) +#endif import Data.ByteString.Lazy.UTF8 (ByteString, fromString) import Text.Pandoc.Shared (readDataFile) import qualified Control.Exception.Extensible as E (try, IOException) diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index f9bbe8796..59666da08 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE OverloadedStrings #-} +{-# LANGUAGE OverloadedStrings, CPP #-} {-# OPTIONS_GHC -fno-warn-deprecations #-} {- Copyright (C) 2006-2010 John MacFarlane <jgm@berkeley.edu> @@ -46,7 +46,12 @@ import Data.List ( isPrefixOf, intersperse ) import Data.String ( fromString ) import Data.Maybe ( catMaybes ) import Control.Monad.State +#if MIN_VERSION_blaze_html(0,5,0) +import Text.Blaze.Html hiding(contents) +import Text.Blaze.Internal(preEscapedString) +#else import Text.Blaze +#endif import qualified Text.Blaze.Html5 as H5 import qualified Text.Blaze.XHtml1.Transitional as H import qualified Text.Blaze.XHtml1.Transitional.Attributes as A |