GNU bug report logs - #27000
25.2; js-jsx-mode incorrect indentation

Previous Next

Package: emacs;

Reported by: Renato Ferreira <renatofdds <at> gmail.com>

Date: Fri, 19 May 2017 22:46:02 UTC

Severity: normal

Found in version 25.2

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


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

From: Renato Ferreira <renatofdds <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; js-jsx-mode incorrect indentation
Date: Fri, 19 May 2017 19:45:28 -0300
Hello,

(I don't know if this bug has the same root cause from bug#24986, so my
apologies if it does.)

Using js-jsx-mode produces incorrect indentation on nested JSX elements
when there is an element inside a parentheses inside a JS expression:

function testA() {
	return (
		<div>
			<div> { ( <div/> ) } </div>
				</div>
	);
}

function testB() {
	return (
		<div>
			<div> { <div/> } </div>
		</div>
	);
}

testA indents correctly, but testB does not. This causes all sorts of
indentations problems after an incorrect indented line.

Thanks a lot in advance!




This bug report was last modified 5 years and 274 days ago.

Previous Next


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