Commit f046d6e9 authored by Jackson Ray Hamilton's avatar Jackson Ray Hamilton

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.
parent 58b2cdc6
Pipeline #1200 failed with stage
in 52 minutes and 26 seconds
......@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment