1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

Fix counting of nested self-closing JSXOpeningElements

* lisp/progmodes/js.el (js-jsx--matching-close-tag-pos): Fix bug where
self-closing JSXOpeningElements might be missed if one was nested
within another.

* test/manual/indent/jsx-self-closing.jsx: Add test for bug concerning
self-closing JSXOpeningElement counting.
This commit is contained in:
Jackson Ray Hamilton 2019-03-25 20:39:48 -07:00
parent 84b1cfbc2d
commit 16669d7c5d
No known key found for this signature in database
GPG key ID: B4771664B476B290
2 changed files with 27 additions and 25 deletions

View file

@ -0,0 +1,13 @@
// Local Variables:
// indent-tabs-mode: nil
// js-indent-level: 2
// End:
// The following test goes below any comments to avoid including
// misindented comments among the erroring lines.
// Properly parse/indent code with a self-closing tag inside the
// attribute of another self-closing tag.
<div>
<div attr={() => <div attr="" />} />
</div>