Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix extra whitespace in text rendering of indented empty lines #2101

Merged
merged 1 commit into from
May 19, 2023

Commits on May 19, 2023

  1. Fix extra whitespace in text rendering of indented empty lines

    The prettyprinter library takes care avoid adding whitespace to empty
    lines when it is rendering indented text.
    
    See:
    
    https://github.com/quchen/prettyprinter/blob/7e32c010ecfaa510c0cbf6ffea04bc7db95d4fcb/prettyprinter/src/Prettyprinter/Internal.hs#L1999
    
    However it only does this for unannotated text.
    
    In our code we were stripping annotations from renderings using
    `toTextStream` but we must remove the annotations before calling
    `layoutPretty`. That's what this commit does.
    paulcadman authored and jonaprieto committed May 19, 2023
    Configuration menu
    Copy the full SHA
    e5e70f1 View commit details
    Browse the repository at this point in the history