I have code like this:
const renderThing = props => (
/* Render a thing */
<div>
<span>
{props.a_thing}
</span>
</div>
);
The <div> does not get highlighted as JSX (it's showing as jsIdentifier), the <span>...</span> is all right, and the </div> is treated as an < operator followed by an unterminated regexp literal /div>, which then renders the ) on the next line as an error (jsRegexpError).
Removing the /* Render a thing */ comment fixes highlighting. Replacing it with a // Render a thing comment also fixes highlighting.
I'm not sufficiently familiar with Vim syntax rules to figure out why this happens or how to fix it.
I have code like this:
The
<div>does not get highlighted as JSX (it's showing asjsIdentifier), the<span>...</span>is all right, and the</div>is treated as an<operator followed by an unterminated regexp literal/div>, which then renders the)on the next line as an error (jsRegexpError).Removing the
/* Render a thing */comment fixes highlighting. Replacing it with a// Render a thingcomment also fixes highlighting.I'm not sufficiently familiar with Vim syntax rules to figure out why this happens or how to fix it.