Firstly, thank you so much for your work on this plugin. It's made working in Atom an absolute dream!
I've just come across what I think might be a very edge case syntax highlighting issue. It occurs when you have a component that you're passing in a function as a prop, and that function is an arrow function that returns another JSX element via an implicit return.
It's hard to describe, so I took screenshots! Here's the broken version - note that the children prop is an arrow function with an implicit return, and note that the syntax highlighting is off.
Here's a version where the arrow function is an explicitly returning one - it has a body wrapped in braces, and you can see the syntax highlighting is working correctly:
Additionally, if I take the broken first example and put the children prop onto its own line, that fixes the highlighting too:
It's a very edge case and easily avoided, but thought I'd raise the issue :)
Firstly, thank you so much for your work on this plugin. It's made working in Atom an absolute dream!
I've just come across what I think might be a very edge case syntax highlighting issue. It occurs when you have a component that you're passing in a function as a prop, and that function is an arrow function that returns another JSX element via an implicit return.
It's hard to describe, so I took screenshots! Here's the broken version - note that the
children
prop is an arrow function with an implicit return, and note that the syntax highlighting is off.Here's a version where the arrow function is an explicitly returning one - it has a body wrapped in braces, and you can see the syntax highlighting is working correctly:
Additionally, if I take the broken first example and put the
children
prop onto its own line, that fixes the highlighting too:It's a very edge case and easily avoided, but thought I'd raise the issue :)