diff --git a/SecretSanta.js b/SecretSanta.js index 524d94a..1875ee4 100644 --- a/SecretSanta.js +++ b/SecretSanta.js @@ -62,7 +62,7 @@ SecretSanta.prototype.generate = function () { } ); - pairings[ name ] = this.enforced[ name ]; + candidatePairings[ name ] = [ this.enforced[ name ] ]; } else { diff --git a/index.html b/index.html index b79f93a..564de49 100755 --- a/index.html +++ b/index.html @@ -372,7 +372,7 @@ return error( 'Syntax error: "' + lines[ t ] + '" isn\'t valid' ); var name = match[ 1 ]; - var rules = match[ 2 ] ? match[ 2 ].match(/[!=][^!=]+/) : null; + var rules = match[ 2 ] ? match[ 2 ].match(/[!=][^!=]+/g) : null; var person = santa.add( name );