-
Notifications
You must be signed in to change notification settings - Fork 219
dhall format: Strip trailing whitespace #955
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
Conversation
This uses Data.Text.Prettyprint.Doc.removeTrailingWhitespace to remove trailing whitespace from pretty printed documents. Fixes dhall-lang#183.
|
|
|
Looks like we need to wait until |
Gabriella439
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to jailbreak hnix if it's just a bounds failure that is blocking this. dhall-to-nix isn't Hackage-ready yet anyway (until hnix cuts a new Hackage release) since dhall-to-nix currently depends on a git revision of hnix
|
Ok, if you're happy with that I'll jailbreak 👍 |
|
I thought about which version number to bump, but the |
|
@quchen: Don't worry about it 🙂 |
|
@ocharles: If you merge ocharles#3 into your branch it should at least fix the Nix build failures |
|
Actually, I noticed something odd while using this branch for unrelated reasons. It appears to mess up formatting and color codes. For example, on { aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa = 1, bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb = 2, cccccccccccccccccccccccccccccccccc = 3 }... is formatted as: { aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
1
, bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb =
2
, cccccccccccccccccccccccccccccccccc =
3
}... with syntax highlighting. But on this branch the highlighting is gone and it's formatted as: { aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =
1
, bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb =
2
, cccccccccccccccccccccccccccccccccc =
3
}You'll see similar behavior for unions, too. |
|
I've started working on a patch that will supersede this PR. |
|
@Gabriel439 The missing colors are probably due to the The removal of leading whitespace seems to be bug in a prettyprinter: See quchen/prettyprinter#84. |
|
Closing in favour of #1422. |
This uses Data.Text.Prettyprint.Doc.removeTrailingWhitespace to remove
trailing whitespace from pretty printed documents.
In the process I also refactored this module a bit to remove duplication.
Fixes #183.