[Pkg-javascript-commits] [uglifyjs] 02/28: Allow colons in the pairs passed to AST_Toplevel.wrap_enclose

Jonas Smedegaard dr at jones.dk
Thu Oct 16 11:57:29 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 e2e09d57548de10892d0595e9fb2a9978aa57726
Author: Arnavion <arnavion at gmail.com>
Date:   Sat Mar 22 18:02:21 2014 -0700

    Allow colons in the pairs passed to AST_Toplevel.wrap_enclose
---
 lib/ast.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/ast.js b/lib/ast.js
index 2f216c2..051cd2f 100644
--- a/lib/ast.js
+++ b/lib/ast.js
@@ -295,10 +295,10 @@ var AST_Toplevel = DEFNODE("Toplevel", "globals", {
         var parameters = [];
 
         arg_parameter_pairs.forEach(function(pair) {
-            var split = pair.split(":");
+            var splitAt = pair.lastIndexOf(":");
 
-            args.push(split[0]);
-            parameters.push(split[1]);
+            args.push(pair.substr(0, splitAt));
+            parameters.push(pair.substr(splitAt + 1));
         });
 
         var wrapped_tl = "(function(" + parameters.join(",") + "){ '$ORIG'; })(" + args.join(",") + ")";

-- 
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