GNU bug report logs - #65134
[PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX expressions

Previous Next

Package: emacs;

Reported by: Danny Freeman <danny <at> dfreeman.email>

Date: Mon, 7 Aug 2023 20:11:02 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Vincenzo Pupillo <v.pupillo <at> gmail.com>
To: 65134 <at> debbugs.gnu.org, danny <at> dfreeman.email
Subject: bug#65134: [PATCH] * lisp/progmodes/js.el Fix js-ts-mode indent bug in JSX expressions
Date: Tue, 08 Aug 2023 11:22:29 +0200
Hi, 
I confirm the bug and that the patch fixes it.
Thank you Danny.

Vincenzo Pupillo 

In data lunedì 7 agosto 2023 22:10:13 CEST, Danny Freeman ha scritto:
> Tags: patch
> 
> 
> Hello,
> 
> I have a patch for a bug I found in js-ts-mode.
> When editing jsx blocks, the indentation does not work.
> 
> For example, in a file with the following file with JSX code in it
> and js-ts-mode enabled
> 
> ```
> function App() {
>   return (
>     <div className="App">
>     </div>
>   );
> }
> ```
> 
> placing your cursor at the end of the opening div tag and pressing ENTER
> does not indent, instead there is no indentation.
> 
> This patch corrects that by properly expanding the
> `js-jsx--treesit-indent-compatibility-bb1f97b' function, which returns
> some indent rules.








This bug report was last modified 1 year and 284 days ago.

Previous Next


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