Skip to content

Commit

Permalink
kv short fix
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Aug 24, 2015
1 parent 63416b8 commit 6bbe145
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ module.exports = function (args, opts) {
continue;
}

if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) {
setArg(letters[j], next.split('=')[1], arg);
broken = true;
break;
}

if (/[A-Za-z]/.test(letters[j])
&& /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) {
setArg(letters[j], next, arg);
Expand All @@ -148,7 +154,7 @@ module.exports = function (args, opts) {
}

if (letters[j+1] && letters[j+1].match(/\W/)) {
setArg(letters[j], arg.slice(j+3), arg);
setArg(letters[j], arg.slice(j+2), arg);
broken = true;
break;
}
Expand Down

0 comments on commit 6bbe145

Please sign in to comment.