From 858bf197fedd46101b3371cd91e505ff79080643 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 10 May 2012 09:13:14 -0700 Subject: Revert "Removed blaze_html_05 flag -- require blaze >= 0.5 by default." This reverts commit f67a80cea27286ba17b3696198602a6bbdae014d. --- src/Text/Pandoc/Templates.hs | 6 +++++- src/Text/Pandoc/Writers/HTML.hs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Templates.hs b/src/Text/Pandoc/Templates.hs index 6e3369797..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 @@ -72,8 +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 b647dcd4b..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 @@ -46,8 +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 -- cgit v1.2.3