fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.63k stars 262 forks source link

Weird error in JSX when using a comma after a tag #1299

Closed jcubic closed 4 months ago

jcubic commented 4 months ago

Got this code:

export function Component(): JSX.Element {
  return (
    <p>
      You can disable this mechanism with
      <a href="http://tinyurl.com/CSP-disable">Chrome Extension</a>,
    but you do this on your own risk.
    </p>
  );
}

The comma after <a> tag makes the rest of the text like JavaScript code. Because do and this are highlighted as keywords. But the real issue is the indentation.

Przechwycenie obrazu ekranu_2024-02-26_19-47-22

fxbois commented 4 months ago

should be fixed with last commit

jcubic commented 4 months ago

Can confirm it works.