You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :)
The text was updated successfully, but these errors were encountered:
jackfranklin
changed the title
Issue with syntax highlighting components that take propFns
Issue with syntax highlighting components that take functions as props.
Sep 13, 2017
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 :)
The text was updated successfully, but these errors were encountered: