From 6ff1e2a976c61268660da4a7cc392bb0a8cd781f Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 3 Aug 2008 23:33:40 +0000 Subject: Improved configuration options and CPP macros. + Now all macros that serve as flags start with a single _. + Added message to '-v' output about UTF-8 support. + Made highlighting the default. If the highlighting-kate library is not present, cabal will deselect the option (unless it was explicitly set). + Add UTF8 support to test function in Text.Pandoc.Shared. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1374 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Shared.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Text/Pandoc/Shared.hs') diff --git a/Text/Pandoc/Shared.hs b/Text/Pandoc/Shared.hs index eb924239d..6ae507cfa 100644 --- a/Text/Pandoc/Shared.hs +++ b/Text/Pandoc/Shared.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {- Copyright (C) 2006-8 John MacFarlane @@ -115,6 +116,12 @@ import Network.URI ( parseURI, URI (..), isAllowedInURI ) import System.FilePath ( (), (<.>) ) import System.IO.Error ( catch, ioError, isAlreadyExistsError ) import System.Directory +import Prelude hiding ( putStrLn ) +#ifdef _UTF8 +import System.IO.UTF8 +#else +import System.IO +#endif -- -- List processing @@ -612,7 +619,7 @@ readWith parser state input = testStringWith :: (Show a) => GenParser Char ParserState a -> String -> IO () -testStringWith parser str = putStrLn $ show $ +testStringWith parser str = putStrLn $ show $ readWith parser defaultParserState str -- | Parsing options. -- cgit v1.2.3