Always quote property names that contain non-ASCII characters.
Fix #328
This commit is contained in:
@@ -168,14 +168,7 @@ function is_identifier_char(ch) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function is_identifier_string(str){
|
function is_identifier_string(str){
|
||||||
var i = str.length;
|
return /^[a-z_$][a-z0-9_$]*$/i.test(str);
|
||||||
if (i == 0) return false;
|
|
||||||
if (!is_identifier_start(str.charCodeAt(0))) return false;
|
|
||||||
while (--i >= 0) {
|
|
||||||
if (!is_identifier_char(str.charAt(i)))
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
function parse_js_number(num) {
|
function parse_js_number(num) {
|
||||||
|
|||||||
Reference in New Issue
Block a user