From 88d0ca8ea70b94747e46c05c060454e604cc6363 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Tue, 22 Jan 2013 10:27:34 +0900 Subject: EPUB: condition Blaze Utf8 module name import on blaze-html version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit blaze-html/blaze-markup-0.5 has Text.Blaze.Html.Renderer.Utf8 whereas blaze-html-0.4 has Text.Blaze.Renderer.Utf8. So this needs to be conditional on the version for pandoc still be with blaze-html-0.4.x --- src/Text/Pandoc/Writers/EPUB.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 4155cca05..802568664 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -56,7 +56,11 @@ import Network.URI ( unEscapeString ) import Text.Pandoc.MIME (getMimeType) import Prelude hiding (catch) import Control.Exception (catch, SomeException) +#ifdef MIN_VERSION_blaze-html(0,5,0) import Text.Blaze.Html.Renderer.Utf8 (renderHtml) +#else +import Text.Blaze.Renderer.Utf8 (renderHtml) +#endif -- | Produce an EPUB file from a Pandoc document. writeEPUB :: WriterOptions -- ^ Writer options -- cgit v1.2.3 From 294df9deedaa17ba019e1dd57221aa2062cb6805 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 22 Jan 2013 08:32:33 -0800 Subject: Fixed MIN_VERSION - need to sub _ for - in blaze-html. --- src/Text/Pandoc/Writers/EPUB.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 802568664..38989807a 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -56,7 +56,7 @@ import Network.URI ( unEscapeString ) import Text.Pandoc.MIME (getMimeType) import Prelude hiding (catch) import Control.Exception (catch, SomeException) -#ifdef MIN_VERSION_blaze-html(0,5,0) +#ifdef MIN_VERSION_blaze_html(0,5,0) import Text.Blaze.Html.Renderer.Utf8 (renderHtml) #else import Text.Blaze.Renderer.Utf8 (renderHtml) -- cgit v1.2.3 From d52a1ec18f3344db5d2c835c0e2744a47042170e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 22 Jan 2013 08:48:43 -0800 Subject: Another fix to the CPP macro in EPUB writer. --- src/Text/Pandoc/Writers/EPUB.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Text/Pandoc/Writers') diff --git a/src/Text/Pandoc/Writers/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs index 38989807a..ea0e921cb 100644 --- a/src/Text/Pandoc/Writers/EPUB.hs +++ b/src/Text/Pandoc/Writers/EPUB.hs @@ -56,7 +56,7 @@ import Network.URI ( unEscapeString ) import Text.Pandoc.MIME (getMimeType) import Prelude hiding (catch) import Control.Exception (catch, SomeException) -#ifdef MIN_VERSION_blaze_html(0,5,0) +#if MIN_VERSION_blaze_html(0,5,0) import Text.Blaze.Html.Renderer.Utf8 (renderHtml) #else import Text.Blaze.Renderer.Utf8 (renderHtml) -- cgit v1.2.3