Skip to content

Fix formatting of switch expressions that contain brace cases inside #6015

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

Merged
merged 2 commits into from
Feb 24, 2023

Conversation

ah-yu
Copy link
Contributor

@ah-yu ah-yu commented Feb 24, 2023

Formatter adds a blank line after braced case, which seems to be a regression introduced in v10

switch foo {                             
| 1 => {
    Js.log(1)
    Js.log(2)
  } 

| 2 => Js.log(3)
}

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks you for the fix.
Perhaps this could be added to the 10.1 branch as well.

@cristianoc cristianoc merged commit 095abc8 into rescript-lang:master Feb 24, 2023
@ah-yu ah-yu deleted the braced-case-expr branch February 24, 2023 10:06
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.

2 participants