[Pkg-javascript-commits] [node-subarg] 03/17: passes its test
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Aug 25 19:28:11 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-subarg.
commit 75a3a8a6c5bf6facedc74ca69a5a17bba6bb8399
Author: James Halliday <mail at substack.net>
Date: Sat Feb 8 19:55:55 2014 -0800
passes its test
---
index.js | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/index.js b/index.js
index 5f60112..5bca484 100644
--- a/index.js
+++ b/index.js
@@ -8,12 +8,14 @@ module.exports = function parse (args, opts) {
index = i;
}
if (inside && /\]$/.test(args[i])) {
- var sub = args.slice(index, i);
+ var sub = args.slice(index, i + 1);
sub[0] = sub[0].replace(/^\[/, '');
- sub[sub.length-1] = sub[sub.length-1].replace(/\[$/, '');
+ if (sub[0] === '') sub.shift();
- args.splice(index, i, parse(sub));
+ sub[sub.length-1] = sub[sub.length-1].replace(/\]$/, '');
+ if (sub[sub.length-1] === '') sub.pop();
+ args.splice(index, i - 1, parse(sub));
inside = false;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-subarg.git
More information about the Pkg-javascript-commits
mailing list