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

Indentation error for JSX fragment #1310

Open jcubic opened 2 months ago

jcubic commented 2 months ago

There is an error in indentation:

function App() {
  return (
    <>
      <a href="https://example.com">
        <img/>
      </a>
    <div>
    </div>
    </>
  );
}

The <div> is not indented the same as <a> and closing fragment is not in color:

Przechwycenie obrazu ekranu_2024-05-18_19-03-43

jcubic commented 1 month ago

Another example:

const Translations = () => {
  const { t } = useTranslation("coi-platform-translations", {
    keyPrefix: keyPrefixes.main,
  });
  return (
    <>
      <Alert severity="info" icon={false}>
        <AlertTitle>{t("info_title")}</AlertTitle>
    <Typography variant="body2">{t("info_description")}</Typography>
    </Alert>
    <EditForm />
    </>
  );
};

This is part of real application.