We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 704017d commit 75a3a8aCopy full SHA for 75a3a8a
index.js
@@ -8,12 +8,14 @@ module.exports = function parse (args, opts) {
8
index = i;
9
}
10
if (inside && /\]$/.test(args[i])) {
11
- var sub = args.slice(index, i);
+ var sub = args.slice(index, i + 1);
12
sub[0] = sub[0].replace(/^\[/, '');
13
- sub[sub.length-1] = sub[sub.length-1].replace(/\[$/, '');
+ if (sub[0] === '') sub.shift();
14
15
- args.splice(index, i, parse(sub));
+ sub[sub.length-1] = sub[sub.length-1].replace(/\]$/, '');
16
+ if (sub[sub.length-1] === '') sub.pop();
17
18
+ args.splice(index, i - 1, parse(sub));
19
inside = false;
20
21
0 commit comments