Skip to content

Commit

Permalink
Add historical note to rTW docs (#184)
Browse files Browse the repository at this point in the history
Context: #170.
  • Loading branch information
sjakobi authored Jul 22, 2020
1 parent 0448c06 commit 2af9089
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions prettyprinter/src/Prettyprinter/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1599,6 +1599,12 @@ data SimpleDocStream ann =
-- no (trimmable) whitespace, since the annotation might actually be /about/ the
-- whitespace, for example a renderer that colors the background of trailing
-- whitespace, as e.g. @git diff@ can be configured to do.
--
-- /Historical note:/ Since v1.7.0, 'layoutPretty' and 'layoutSmart' avoid
-- producing the trailing whitespace that was the original motivation for
-- creating 'removeTrailingWhitespace'.
-- See <https://github.com/quchen/prettyprinter/pull/139> for some background
-- info.
removeTrailingWhitespace :: SimpleDocStream ann -> SimpleDocStream ann
removeTrailingWhitespace = go (RecordedWhitespace [] 0)
where
Expand Down

0 comments on commit 2af9089

Please sign in to comment.