Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in tsx-ts-mode

From: Juri Linkov <[email-masked]>
Date: Wed, 25 Dec 2024 09:40:48 +0200

>> ReactDOM.render(
>> <div>
>> <h1>Hello, Welcome to React and TypeScript</h1>
>> </div>,
>>  document.getElementById("root")
>> );
>> 
>> 1. move point to the beginning of <h1>
>> 2. type C-M-b
>> 3. point incorrectly moves to inside <div>
>> 
>> However, this the above patch, point doesn't move
>> that is correct.
>> 
>> Another test case:
>> 
>> 1. move point to the beginning of the word "Welcome"
>> 2. type C-M-b
>> 3. point incorrectly moves to the letter "e" instead of correct "H"
>> 
>> 4. type C-M-f a few times until the end of text
>> 5. point stops at the letter "t" instead of moving after the last letter
>> 
>> All these cases work correctly with the patch above.
>
> I understand the problem you want to solve, but the patch above will
> bring back the bug I was trying to fix in the first place.

The patch just demonstrated one of possible ways to solve the problem.

> And I still don’t understand the intention of your patch.  Maybe
> I missed something.  Am I correct that you want to apply string syntax
> on the tags, eg, <div>, <button>, </button>, </div>?

I don't need to apply string syntax on the tags.  I just found
that currently C-M-f navigation was broken.  Maybe there are
other ways to fix it?