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

Double wrapped optionals using dot notation not formatted correctly #9

Closed
MrAdamBoyd opened this issue Aug 25, 2016 · 2 comments
Closed

Comments

@MrAdamBoyd
Copy link

I noticed that SwiftFormat doesn't format double wrapped optionals that use dot notation correctly. It takes the working code and changes it so it can't compile. Here's an example of working code:

let hello: String?? = "Hello"
let capitalHello = hello??.capitalizedString

After SwiftFormat:

let hello: String?? = "Hello"
let capitalHello = hello ??. capitalizedString

Notice the extra space before and after ??. in the second line. This is reproducible 100% of the time for me.

@nicklockwood
Copy link
Owner

Thanks, I'll take a look.

@nicklockwood
Copy link
Owner

Fixed in 0.5.1

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

No branches or pull requests

2 participants