GNU bug report logs - #73978
31.0.50; Text syntax applied on too many things in tsx-ts-mode

Previous Next

Package: emacs;

Reported by: Yuan Fu <casouri <at> gmail.com>

Date: Thu, 24 Oct 2024 04:08:02 UTC

Severity: normal

Found in version 31.0.50

Done: Yuan Fu <casouri <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #46 received at 73978 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Yuan Fu <casouri <at> gmail.com>
Cc: dmitry <at> gutov.dev, theo <at> thornhill.no, 73978 <at> debbugs.gnu.org
Subject: Re: bug#73978: 31.0.50; Text syntax applied on too many things in
 tsx-ts-mode
Date: Tue, 24 Dec 2024 09:59:10 +0200
> I went with the whitespace trick and pushed my patch to master.

While testing forward-sexp in tsx-ts-mode I noticed that
this line in 'tsx-ts--s-p-query':

  ((jsx_text) @jsx)

disrupts syntax-based navigation for forward-sentence-default-function.

In such example:

import * as React from "react";
import * as ReactDOM from "react-dom";
ReactDOM.render(
<div>
<h1>Hello, Welcome to React and TypeScript</h1>
</div>,
  document.getElementById("root")
);

'C-M-b' on text inside <h1> stops after the first "H" in "Hello", and
'C-M-f' before the last "t" in "TypeScript".  It seems the first
and the last characters are interpreted as the opening/closing fence?




This bug report was last modified 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.