joshpeng / Sublime-Babel-VSCode

Sublime Text's babel-sublime grammar in VS Code.
MIT License
49 stars 16 forks source link

Add support to React.Fragment short syntax #31

Closed brneto closed 6 years ago

brneto commented 6 years ago

Issue #30

React v16.2.0 add support for returning multiple children using a new feature called fragments and include a short syntax to declare fragments. You do that using <></> the same way you'd use any other element except that it doesn't support keys or attributes.

Because of this vscode plugin was not recognizing this new feature correctly, I have decided to fix it and that's PR is for.

brneto commented 6 years ago

I've made some more tests and seems that this PR didn't what I was expecting!

brneto commented 6 years ago

After I've changed the code to support react short fragment syntax I started to have issues with JSX self-closing tag highlighting.

I've given a second look, I figure out what I've done wrong and fixed the problem with this new commit! 😄