Skip to content

Commit

Permalink
Merge pull request #118 from cdepillabout/phprint-handle-fix
Browse files Browse the repository at this point in the history
Use correct handle for newline output
  • Loading branch information
georgefst authored Sep 26, 2022
2 parents 4ce43cc + 547fc88 commit 1c3c612
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Text/Pretty/Simple.hs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ import Prettyprinter (SimpleDocStream)
import Prettyprinter.Render.Terminal
(Color (..), Intensity(Vivid,Dull), AnsiStyle,
renderLazy, renderIO)
import System.IO (Handle, stdout)
import System.IO (Handle, stdout, hPutStrLn)

import Text.Pretty.Simple.Internal
(ColorOptions(..), Style(..), CheckColorTty(..),
Expand Down Expand Up @@ -526,7 +526,7 @@ pHPrintStringOpt checkColorTty outputOptions handle str = do
NoCheckColorTty -> pure outputOptions
liftIO $ do
renderIO handle $ layoutStringAnsi realOutputOpts str
putStrLn ""
hPutStrLn handle ""

-- | Like 'pShow' but takes 'OutputOptions' to change how the
-- pretty-printing is done.
Expand Down

0 comments on commit 1c3c612

Please sign in to comment.