aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-06-11 21:22:44 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-11 21:22:44 +0200
commitd1da54a4c3138df6781dfe1d67a4d83d2f8adc61 (patch)
treebb869a80cb6e3087695e26fe1fc2abf5f376645a
parentf5d2d77ed94432a94f7ca4c23ec1a4ae559eed65 (diff)
downloadpandoc-d1da54a4c3138df6781dfe1d67a4d83d2f8adc61.tar.gz
Properly decode source from stdin.
This should fix the appveyor failures.
-rw-r--r--src/Text/Pandoc/App.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 658266046..19066e8b7 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -56,7 +56,6 @@ import Data.Maybe (fromMaybe, isJust, isNothing)
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as T
-import qualified Data.Text.IO as T
import Data.Yaml (decode)
import qualified Data.Yaml as Yaml
import GHC.Generics
@@ -791,7 +790,7 @@ applyFilters mbDatadir filters args d = do
foldrM ($) d $ map (flip externalFilter args) expandedFilters
readSource :: FilePath -> PandocIO Text
-readSource "-" = liftIO T.getContents
+readSource "-" = liftIO (UTF8.toText <$> BS.getContents)
readSource src = case parseURI src of
Just u | uriScheme u `elem` ["http:","https:"] ->
readURI src