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 typedef declaration is moved to the next line #643

Closed
anissen opened this issue Aug 10, 2021 · 0 comments
Closed

Comments in typedef declaration is moved to the next line #643

anissen opened this issue Aug 10, 2021 · 0 comments
Labels
bug Something isn't working lineends line end handling

Comments

@anissen
Copy link

anissen commented Aug 10, 2021

There does not seem to be a configuration to disallow the following formatting:

Input file

typedef T = {
    a: Float // Comment
}

Result

typedef T = {
    a: Float
    // Comment
}

I would like for the formatting to remain as in the input file.

A possible workaround...

... is to make a trailing comma (requiring a block comment instead of a single line comment) to avoid breaking the line into multiple lines

typedef T = {
    a: Float /* Comment */,
}
@AlexHaxe AlexHaxe added bug Something isn't working lineends line end handling labels Aug 10, 2021
AlexHaxe added a commit to AlexHaxe/haxe-formatter that referenced this issue Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lineends line end handling
Projects
None yet
Development

No branches or pull requests

2 participants