[Pkg-javascript-commits] [uglifyjs] 07/28: Always quote property names that contain non-ASCII characters.
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 11:57:30 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository uglifyjs.
commit 8fbe20001215887275b3cf053be675ebdbf331a9
Author: Mihai Bazon <mihai at bazon.net>
Date: Fri Apr 18 10:47:38 2014 +0300
Always quote property names that contain non-ASCII characters.
Fix #328
---
lib/parse.js | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/lib/parse.js b/lib/parse.js
index b061067..de982b1 100644
--- a/lib/parse.js
+++ b/lib/parse.js
@@ -168,14 +168,7 @@ function is_identifier_char(ch) {
};
function is_identifier_string(str){
- var i = str.length;
- 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;
+ return /^[a-z_$][a-z0-9_$]*$/i.test(str);
};
function parse_js_number(num) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/uglifyjs.git
More information about the Pkg-javascript-commits
mailing list