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: print line comment after arrow in lamda between paranthesis. #539

Closed
wants to merge 2 commits into from

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Oct 25, 2019

Fixes #534

Currently, two tests fail but I'm a bit confused about those tests in the first place.

[<Test>]
let ``line comment after "if"``() =
    formatSourceString false """
if //comment
    true then 1
else 0""" config
    |> prepend newline
    |> should equal """
if true then 1 //comment
else 0
"""

[<Test>]
let ``line comment after "else"``() =
    formatSourceString false """
if true then 1
else //comment
    0""" config
    |> prepend newline
    |> should equal """
if true then 1
else 0 //comment
"""

Why can't the comments not be after the keyword like in the original code?

@nojaf nojaf changed the title FIx: print line comment after arrow in lamda between paranthesis. Fix: print line comment after arrow in lamda between paranthesis. Oct 25, 2019
@jindraivanek
Copy link
Contributor

Why can't the comments not be after the keyword like in the original code?

I don't remember exact details, but I think it was complicated to have correct indentation. Certainly it would be better to respect position of comment.

@nojaf
Copy link
Contributor Author

nojaf commented Nov 9, 2019

Closing in favour of #557

@nojaf nojaf closed this Nov 9, 2019
@nojaf nojaf deleted the fix-534 branch December 15, 2019 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comments like (fun arg -> // comment are lost
2 participants