gandm / language-babel

ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM
https://atom.io/packages/language-babel
MIT License
476 stars 83 forks source link

Highlighting error with literal parenthesis in JSX #502

Open captbaritone opened 6 years ago

captbaritone commented 6 years ago
<span>(</span>

screen shot 2018-05-29 at 12 57 58 pm

I guess parenthesis in JSX should be treated as strings.

This workaround works:

const foo = <span>"("</span>
gandm commented 6 years ago

Thanks. Yes I'm aware https://github.com/gandm/language-babel/blob/master/grammars/Babel%20Language.json#L93-L95 was used to attempt to trap flow generics functions. I may have to change that.