EPUB: condition Blaze Utf8 module name import on blaze-html version

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
This commit is contained in:
Jens Petersen 2013-01-22 10:27:34 +09:00
parent f468db9277
commit 88d0ca8ea7

View file

@ -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