git.iko.soy/typeable/pandoc
on master help sign in
PDF: Fix test for Cygwin. See #5451.
commit297afd0aa989219386f518291dab3a3e148bc311 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 16 Sep 2019, 08:30 (7 years ago) parent4fe6bd4
1 file changed+2−2
src/Text/Pandoc/PDF.hs+2−2
src/Text/Pandoc/PDF.hs+2−2
@@ -28,7 +28,7 @@ import Data.Maybe (fromMaybe)
2828import Data.Text (Text)
2929import qualified Data.Text as T
3030import Text.Printf (printf)
31−import Data.Char (ord, isAscii)
31+import Data.Char (ord, isAscii, isSpace)
3232import System.Directory
3333import System.Environment
3434import System.Exit (ExitCode (..))
@@ -93,7 +93,7 @@ makePDF program pdfargs writer opts doc =
9393 uname <- E.catch
9494 (do (ec, sout, _) <- readProcessWithExitCode "uname" ["-o"] ""
9595 if ec == ExitSuccess
96− then return $ Just sout
96+ then return $ Just $ filter (not . isSpace) sout
9797 else return Nothing)
9898 (\(_ :: E.SomeException) -> return Nothing)
9999 if '~' `elem` tmp || uname == Just "Cygwin" -- see #5451