diff options
author | Jackson Ray Hamilton <jackson@jacksonrayhamilton.com> | 2019-03-25 20:39:48 -0700 |
---|---|---|
committer | Jackson Ray Hamilton <jackson@jacksonrayhamilton.com> | 2019-04-08 22:48:23 -0700 |
commit | 16669d7c5d5a0dfadf672f8359e431ef81044a23 (patch) | |
tree | 55d370ebbabd90345a34f081772a5a1ef81e7021 /test/manual/indent | |
parent | 84b1cfbc2d6b9236913a18ed192798fd530911db (diff) | |
download | emacs-16669d7c5d5a0dfadf672f8359e431ef81044a23.tar.gz emacs-16669d7c5d5a0dfadf672f8359e431ef81044a23.tar.bz2 emacs-16669d7c5d5a0dfadf672f8359e431ef81044a23.zip |
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.
Diffstat (limited to 'test/manual/indent')
-rw-r--r-- | test/manual/indent/jsx-self-closing.jsx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/manual/indent/jsx-self-closing.jsx b/test/manual/indent/jsx-self-closing.jsx new file mode 100644 index 00000000000..f8ea7a138ad --- /dev/null +++ b/test/manual/indent/jsx-self-closing.jsx @@ -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> |