diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-09-16 08:30:57 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-09-16 08:30:57 -0700 |
commit | 297afd0aa989219386f518291dab3a3e148bc311 (patch) | |
tree | f57136e78443a7cd48575b5bc8f6bdf850f4d66a /src/Text | |
parent | 4fe6bd47596b0d0da2647d24e8482ff89ee2ac85 (diff) | |
download | pandoc-297afd0aa989219386f518291dab3a3e148bc311.tar.gz |
PDF: Fix test for Cygwin. See #5451.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/PDF.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/PDF.hs b/src/Text/Pandoc/PDF.hs index a9114e8d5..17aec792d 100644 --- a/src/Text/Pandoc/PDF.hs +++ b/src/Text/Pandoc/PDF.hs @@ -28,7 +28,7 @@ import Data.Maybe (fromMaybe) import Data.Text (Text) import qualified Data.Text as T import Text.Printf (printf) -import Data.Char (ord, isAscii) +import Data.Char (ord, isAscii, isSpace) import System.Directory import System.Environment import System.Exit (ExitCode (..)) @@ -93,7 +93,7 @@ makePDF program pdfargs writer opts doc = uname <- E.catch (do (ec, sout, _) <- readProcessWithExitCode "uname" ["-o"] "" if ec == ExitSuccess - then return $ Just sout + then return $ Just $ filter (not . isSpace) sout else return Nothing) (\(_ :: E.SomeException) -> return Nothing) if '~' `elem` tmp || uname == Just "Cygwin" -- see #5451 |