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

Comments should not be pulled out of necessary parens in function application arguments #762

Open
avh4 opened this issue Jan 14, 2022 · 0 comments
Labels
Milestone

Comments

@avh4
Copy link
Owner

avh4 commented Jan 14, 2022

Input:

x f b = f {-A-} ({-B-} 1 + 2) b

Actual output (version 0.8.5):

x f b =
    f {- A -} {- B -} (1 + 2) b

Expected output:

x f b =
    f {- A -} ({- B -} 1 + 2) b

This happens because the merging of the comments is not aware of the syntax context and removes the parens and merges the comments, but luckily the formatter is smart enough to know that the parens need to be added back.

@avh4 avh4 added the bug label Jan 14, 2022
@avh4 avh4 added this to the 0.8.7 milestone Apr 4, 2023
@avh4 avh4 modified the milestones: 0.8.7, Future 0.8.* Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant