bug#81460: 31.0.90; tsx-ts-mode matches html tag's opening < with > in arrow function =>

Sean Whitton <[email protected]> Wed, 05 Aug 2026 11:22:48 +0100
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Version: 31.1

Yuan Fu [04/Aug 11:33pm -07] wrote:
>> On Aug 4, 2026, at 5:46 AM, Sean Whitton <[email protected]> wrote:
>>
>> Binbin YE [23/Jul  9:10pm +08] wrote:
>>> --text follows this line--
>>>
>>>
>>> tsx-ts-mode has trouble handling following syntax. the `<` in
>>>
>>> `<Component' matches wrongly to `>' in `=>'.
>>>
>>>
>>> <Component onChange={(_, value) => {...}}>
>>>
>>>
>>> Also the {} [] in `onCallback = {() => { return [] }}' are treated as
>>>
>>> punctuation instead of open or closing brackets.
>>>
>>>
>>> I attached a patch for the fix.
>>
>> The patch looks suitably minimal for the emacs-31 branch.
>>
>> Theo or Yuan, could you take a look?
>>
>> Thanks.
>
> Looks reasonable to me, thanks for the patch Binbin!

Thanks for the review Yuan.

Installed and closing the bug.

Binbin, please take a look at my revised commit message.  We prefer not
to have extensive commentary in commit messages.

-- 
Sean Whitton