-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Pair printing :(get! => 4) doesn't add space to avoid ambiguity #8994
Comments
Parsing operators is greedy, so it's going to see a |
I see. In that case, maybe add spaces to the string rep:
|
Yes, that seems reasonable. We should at least improve the heuristics so that the space is printed when it is needed. |
Adding a few spaces wouldn't be so bad in general. It seems possible to break all the operators listed in
But it would be nice to avoid spaces around Another interesting one is
|
How about just printing the spaces all the time? I find it much more readable and it's way simpler. |
Hmm.. This probably isn't a backport worthy issue, because the |
also enclose operators in parens in some contexts
The second example should probably work:
The text was updated successfully, but these errors were encountered: