bonham000 / fcc-react-tests-module

The original freeCodeCamp React/Redux alpha curriculum.
http://hysterical-amusement.surge.sh/
BSD 3-Clause "New" or "Revised" License
77 stars 38 forks source link

Syntax highlighting not working properly when implementing fat arrow functions #205

Closed b4ux1t3 closed 7 years ago

b4ux1t3 commented 7 years ago

Spotted in React 28: Write a Simple Counter, but it works in all of the editing sections. Every method following a fat arrow function loses its syntax highlighting. The same does not happen when declaring a normal method.

Image

Normal methods don't break highlinghting

bonham000 commented 7 years ago

Yes, we've noticed this a while ago... it has to do with (I think) the fact that writing class methods as ES6 arrow functions is actually a feature provided by a future JavaScript version (as noted in Challenge 26). So I think this is breaking the syntax highlighting... which is managed by a third party library so this is not a major concern.

b4ux1t3 commented 7 years ago

Gotcha, I wasn't sure if you'd made the editor yourself or not.