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

Adds formatting for if_else control flow blocks #2564

Merged
merged 6 commits into from Aug 18, 2022

Conversation

eureka-cpu
Copy link
Contributor

@eureka-cpu eureka-cpu commented Aug 17, 2022

Ref #2493

This will have to change slightly if #2539 gets in first and vice versa since it adds changes to CodeBlockContents which they both rely on.

@eureka-cpu eureka-cpu added enhancement New feature or request forc formatter labels Aug 17, 2022
@eureka-cpu eureka-cpu added this to the swayfmt-v2 milestone Aug 17, 2022
@eureka-cpu eureka-cpu self-assigned this Aug 17, 2022
@Braqzen
Copy link
Contributor

Braqzen commented Aug 17, 2022

I may be misunderstanding something but it seems to me like the desired output of the test and the intermediate whitespace are duplicates. Shouldn't they be different so that a messy form gets formatted into the desired form?

@eureka-cpu
Copy link
Contributor Author

I may be misunderstanding something but it seems to me like the desired output of the test and the intermediate whitespace are duplicates. Shouldn't they be different so that a messy form gets formatted into the desired form?

Right you are, I was expecting to have to resolve some conflicts so I got lazy. Thanks for the catch 😄

Copy link
Contributor

@bingcicle bingcicle left a comment

Choose a reason for hiding this comment

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

LGTM - tested some simple variations on a forc init project as well using the test code snippet too.

@eureka-cpu eureka-cpu merged commit 329e7e2 into master Aug 18, 2022
@eureka-cpu eureka-cpu deleted the eureka-cpu/conditional-expr branch August 18, 2022 06:21
@eureka-cpu eureka-cpu mentioned this pull request Aug 23, 2022
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request forc formatter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants