felipeochoa / rjsx-mode

A JSX major mode for Emacs
https://github.com/felipeochoa/rjsx-mode
MIT License
641 stars 32 forks source link

Angle brackets cause cascading failure in syntax highlighting #133

Closed m1cm1c closed 2 years ago

m1cm1c commented 2 years ago

Minimal example:

export default function Foo() {
  const foo = (event : React.ChangeEvent<HTMLInputElement>) => {
    console.log(event);
  };

  const bar = () => {
    console.log('bar');
  };
}

The code is rendered in red from the element containing the angle brackets until the end of the buffer: image

felipeochoa commented 2 years ago

RJSX does not support type annotations