Skip to content

Fix JSX removing semicolons#2406

Merged
jordwalke merged 1 commit into
reasonml:masterfrom
anmonteiro:anmonteiro/fix-gh-2384
May 8, 2019
Merged

Fix JSX removing semicolons#2406
jordwalke merged 1 commit into
reasonml:masterfrom
anmonteiro:anmonteiro/fix-gh-2384

Conversation

@anmonteiro

Copy link
Copy Markdown
Member

Turns out we can have our cake and eat it too. This fixes e.g. #2384 and a few others, resulting from a bug I introduced in #2223

uri
/>;
}
{let uri = "/images/header-background.png";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't have this form of wrapping anywhere else (not intentionally at least). Is there a reason why this isn't breaking into multiple lines?

{
  let uri = 
  ...
}

@anmonteiro anmonteiro May 7, 2019

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This has been here for a while, e.g. #2208.

We did it initially to save space on JSX patterns like:

<div>
  {
    React.string("foo")
  }
</div>

@jordwalke

Copy link
Copy Markdown
Member

Thank you for the fix!

@jordwalke
jordwalke merged commit ab4bf53 into reasonml:master May 8, 2019
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.

3 participants