peitalin / vim-jsx-typescript

React JSX syntax highlighting for vim and Typescript
The Unlicense
305 stars 29 forks source link

One-line JSX with embedded javascript seems to give problem #19

Closed rnmp closed 4 years ago

rnmp commented 4 years ago

image

Note how the close tag doesn't match the open tag. Compare to this:

image

Is this a bug or am I missing a special configuration?

rnmp commented 4 years ago

Btw I think it may be related to how tsxJsBlocks are defined, my gut tells me that everything after } gets interpreted as a javascript expression, hence the < colored as a lower than sign.

peitalin commented 4 years ago

Hi @rnmp thanks for submitting this bug, I've made a few fixes.

image

Please check it out and let me know if you run into any issues.

rnmp commented 4 years ago

All fixed up! Thanks for getting to it so quickly! I actually just switched back to vim after years, and having proper TSX syntax coloring was one of my only minor concerns.