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

Fix precedence printing of a->(b##c) #2111

Merged

Conversation

anmonteiro
Copy link
Member

This change makes the formatting of fast pipe nodes reuse the same logic that we use elsewhere to format infix operators.

With this change I hope to mitigate future edge cases that would appear because of this custom fast pipe logic.

This change makes the formatting of fast pipe nodes reuse the same logic that we use elsewhere to format infix operators.

With this change I hope to mitigate future edge cases that would appear because of this custom fast pipe logic.
@IwanKaramazow
Copy link
Contributor

IwanKaramazow commented Aug 7, 2018

@anmonteiro can you add an extra test for #2118

 (switch (saveStatus) {
                | Pristine => ""
                | Saved => "Saved"
                | Saving => "Saving"
                | Unsaved => "Unsaved"
                })
              ->str

<div>
 (switch (saveStatus) {
                | Pristine => ""
                | Saved => "Saved"
                | Saving => "Saving"
                | Unsaved => "Unsaved"
                })
              ->str
</div>

blocks->(blocks => {"blocks": blocks})
<div> blocks->(blocks => {"blocks": blocks}) </div>

(state.title == "" ? "untitled" : state.title)->str
<title> ((state.title == "" ? "untitled" : state.title)->str) </title>

ReasonReact.Router.watchUrl(url => Route.urlToRoute(url)->ChangeView->(self.send));
ReasonReact.Router.watchUrl(url => Route.urlToRoute(url)->ChangeView->self.send);

@thangngoc89
Copy link
Contributor

@IwanKaramazow I added a number 4 case on #2118. You might want to check it out

@IwanKaramazow
Copy link
Contributor

Discussed in private, ready!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants