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 in anonymous record deleted after formatting #2538

Closed
1 of 3 tasks
edgarfgp opened this issue Sep 29, 2022 · 2 comments · Fixed by #2539
Closed
1 of 3 tasks

Comments in anonymous record deleted after formatting #2538

edgarfgp opened this issue Sep 29, 2022 · 2 comments · Fixed by #2539
Labels
bug (soundness) good first issue Long hanging fruit: easy issue to get your feet wet!

Comments

@edgarfgp
Copy link
Contributor

Issue created from fantomas-online

Code

module Test

let Anonymous =
    {| FontFamily = 700 // font-weight
       FontSize = 48. |}

Result

module Test

let Anonymous = {| FontFamily = 700; FontSize = 48. |}

Problem description

Please describe here the Fantomas problem you encountered.
Check out our Contribution Guidelines.

Extra information

  • The formatted result breaks my code.
  • The formatted result gives compiler warnings.
  • I or my company would be willing to help fix this.

Options

Fantomas master branch at 2022-09-20T21:08:34Z - 11c2a86

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?

@nojaf
Copy link
Contributor

nojaf commented Sep 29, 2022

Hello,

In

addFixedSpaces targetColumn
+> atCurrentColumn (enterNodeFor SynExpr_AnonRecd_Field range +> genIdent ident)
+> genEq SynExpr_AnonRecd_Field_Equals eq
+> expr)

There is an enterNodeFor SynExpr_AnonRecd_Field range, to solve your problem you probably want to add a matching +> leaveNodeFor SynExpr_AnonRecd_Field range after expr.

Are you up for it?

@nojaf nojaf added bug (soundness) good first issue Long hanging fruit: easy issue to get your feet wet! labels Sep 29, 2022
@edgarfgp
Copy link
Contributor Author

Sure 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (soundness) good first issue Long hanging fruit: easy issue to get your feet wet!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants