GNU bug report logs -
#65470
29.1.50; js-ts-mode: regex pattern can cause incorrect parenthesis matching
Previous Next
Reported by: Augustin Chéneau (BTuin) <btuin <at> mailo.com>
Date: Wed, 23 Aug 2023 11:16:01 UTC
Severity: normal
Tags: patch
Found in version 29.1.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi Augustin!
On 25/08/2023 10:17, Augustin Chéneau (BTuin) wrote:
> Thanks for the patch, but I still have some issues. I believe that the
> START and END arguments of `put-text-property` are off by one. The
> attached modified patch seems to work better.
Thanks for trying it out. Sorry about missing your first patch:
apparently while it was the first time-wise, it was help up in moderation.
Anyway, you make a good point about the case with the regexp: since I
matched the pattern inside, the bounds of the node are off by one
compared to the case with the jsx node. Your patch moves those bounds,
but then they'll be wrong for the latter case.
Here's an update which tries to handle both, but I guess if we add more
node types later we'll just have to stop trying to handle them the same
way (and do it closer to ruby-ts--syntax-propertize).
Also added the new return_statement case for jsx.
[js-ts--syntax-propertize-v2.diff (text/x-patch, attachment)]
This bug report was last modified 1 year and 249 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.