diff options
author | Leon Clarke <leonclarke@google.com> | 2010-01-19 14:06:41 +0000 |
---|---|---|
committer | Leon Clarke <leonclarke@google.com> | 2010-01-19 16:34:04 +0000 |
commit | e46be819fca9468a0cd4e74859ce0f778eb8ca60 (patch) | |
tree | f9c37105a3367f2ad5d31fbc2cb37b84fa67b59a /tools/jsmin.py | |
parent | d0582a6c46733687d045e4188a1bcd0123c758a1 (diff) | |
download | android_external_v8-e46be819fca9468a0cd4e74859ce0f778eb8ca60.tar.gz android_external_v8-e46be819fca9468a0cd4e74859ce0f778eb8ca60.tar.bz2 android_external_v8-e46be819fca9468a0cd4e74859ce0f778eb8ca60.zip |
New version of v8 from bleeding edge at revision 3649
Diffstat (limited to 'tools/jsmin.py')
-rw-r--r-- | tools/jsmin.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/jsmin.py b/tools/jsmin.py index fd1abe48..646bf143 100644 --- a/tools/jsmin.py +++ b/tools/jsmin.py @@ -230,7 +230,9 @@ class JavaScriptMinifier(object): # A regexp that matches a literal string surrounded by 'double quotes'. single_quoted_string = r"'(?:[^'\\]|\\.)*'" # A regexp that matches a regexp literal surrounded by /slashes/. - slash_quoted_regexp = r"/(?:[^/\\]|\\.)+/" + # Don't allow a regexp to have a ) before the first ( since that's a + # syntax error and it's probably just two unrelated slashes. + slash_quoted_regexp = r"/(?:(?=\()|(?:[^()/\\]|\\.)+)(?:\([^/\\]|\\.)*/" # Replace multiple spaces with a single space. line = re.sub("|".join([double_quoted_string, single_quoted_string, |