mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Permit non-ASCII identifiers in JS
* lisp/progmodes/js.el (js--name-start-re): Generally allow identifiers to begin with non-ASCII letters. This is of particular importance to JSX parsing. * test/manual/indent/jsx-unclosed-2.jsx: Add test to ensure non-ASCII characters are parsed properly.
This commit is contained in:
parent
3eadf1eff4
commit
18bbfc4c75
2 changed files with 8 additions and 1 deletions
|
|
@ -65,7 +65,7 @@
|
|||
|
||||
;;; Constants
|
||||
|
||||
(defconst js--name-start-re (concat "[a-zA-Z_$]")
|
||||
(defconst js--name-start-re (concat "[[:alpha:]_$]")
|
||||
"Regexp matching the start of a JavaScript identifier, without grouping.")
|
||||
|
||||
(defconst js--stmt-delim-chars "^;{}?:")
|
||||
|
|
|
|||
|
|
@ -56,3 +56,10 @@ while (await foo > bar) void 0
|
|||
/ >
|
||||
< / div>
|
||||
< / div >
|
||||
|
||||
// Non-ASCII identifiers are acceptable.
|
||||
<Über>
|
||||
<Québec διακριτικός sueño="">
|
||||
Guten Tag!
|
||||
</Québec>
|
||||
</Über>
|
||||
|
|
|
|||
Loading…
Reference in a new issue