Permalink
Browse files

Add clobbered `optional_match` back.

Add back `optional_match`, which got lost somewhere in the mix.
  • Loading branch information...
1 parent c54f6c7 commit fa5ed8eed453e257e7604dbf059b04100b1f9416 @byronmccollum byronmccollum committed Aug 5, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/optparse.js
View
@@ -119,6 +119,7 @@ function build_rule(filters, short, expr, desc) {
// A switch argument is expected. Check if the argument is optional,
// then find a filter that suites.
var optional = ARG_OPTIONAL_RE.test(m[2]);
+ var optional_match = m[2].match(ARG_OPTIONAL_RE);
var filter_name = optional ? optional_match[1] : m[2];
filter = filters[filter_name];
if(filter === undefined) filter = filters[DEFAULT_FILTER];

0 comments on commit fa5ed8e

Please sign in to comment.