diff options
| author | Jackson Ray Hamilton | 2019-03-24 09:55:14 -0700 |
|---|---|---|
| committer | Jackson Ray Hamilton | 2019-04-08 22:48:22 -0700 |
| commit | 8b92719b6b31d26299b5feae0ea92bb80f835e3d (patch) | |
| tree | c406d203b06a1832de0b7d299f9ed0acad60e0be /test | |
| parent | bf37078df2cbea3a44a641ddbe40f11339c135a2 (diff) | |
| download | emacs-8b92719b6b31d26299b5feae0ea92bb80f835e3d.tar.gz emacs-8b92719b6b31d26299b5feae0ea92bb80f835e3d.zip | |
Improve JSX syntax propertization
* lisp/progmodes/js.el (js-jsx--attribute-name-re): New variable.
(js-jsx--syntax-propertize-tag): Allow “-” in JSXAttribute names. Fix
“out of range” error when typing at the end of a buffer. Fix/improve
future propertization of unfinished JSXBoundaryElements.
* test/manual/indent/js-jsx-unclosed-2.js: Add tests for allowed
characters in JSX.
Diffstat (limited to 'test')
| -rw-r--r-- | test/manual/indent/js-jsx-unclosed-2.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/manual/indent/js-jsx-unclosed-2.js b/test/manual/indent/js-jsx-unclosed-2.js index 8b6f33325d7..843ef9b6a88 100644 --- a/test/manual/indent/js-jsx-unclosed-2.js +++ b/test/manual/indent/js-jsx-unclosed-2.js | |||
| @@ -29,3 +29,11 @@ while (await foo > bar) void 0 | |||
| 29 | </Baz> | 29 | </Baz> |
| 30 | </Bar> | 30 | </Bar> |
| 31 | </Foo> | 31 | </Foo> |
| 32 | |||
| 33 | // “-” is not allowed in a JSXBoundaryElement’s name. | ||
| 34 | <ABC /> | ||
| 35 | <A-B-C /> // Weirdly-indented “continued expression.” | ||
| 36 | |||
| 37 | // “-” may be used in a JSXAttribute’s name. | ||
| 38 | <Foo a-b-c="" | ||
| 39 | x-y-z="" /> | ||