-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
Anonymous types in a DU inserts newlines #2621
Comments
Hello, thank you for reporting this issue. I believe the problem is introduced around: fantomas/src/Fantomas.Core/CodePrinter.fs Lines 3484 to 3485 in 18a97bd
Changing this behaviour to: +> (match so with
| None -> t
| Some name -> genIdent name +> sepColon +> autoIndentAndNlnIfExpressionExceedsPageWidth t
|> optSingle (genTriviaFor SynField_IdentifierAndType) innerRange) probably does the trick. |
Probably tomorrow I can have a go |
Also thank you for your quick feedback! |
Yeah that does the trick, I will try submitting the PR tomorrow. any guidance for where place the test and should there be more than one test for this fix? |
I think adding a single test to |
Issue created from fantomas-online
Code
Result
Problem description
Please describe here the Fantomas problem you encountered.
Check out our Contribution Guidelines.
Extra information
Options
Fantomas main branch at 2022-11-10T07:58:47Z - 573d273
Default Fantomas configuration
Did you know that you can ignore files when formatting from fantomas-tool or the FAKE targets by using a .fantomasignore file?
The text was updated successfully, but these errors were encountered: