Bugfix: Correctly split list of mail addresses
authorGregor Hoffleit <gregor@sam.mediasupervision.de>
Tue, 12 Oct 2010 16:04:37 +0000 (18:04 +0200)
committerRich Lane <rlane@club.cc.cmu.edu>
Wed, 13 Oct 2010 06:09:18 +0000 (23:09 -0700)
commit8b98322a2a6bb0cbc6ea8901eface46ea6f24e92
treee6fd4f5babe466672df21c011cc136aabf24cc0b
parent1064da8553261bdd1aad789e82ef000888c86fa4
Bugfix: Correctly split list of mail addresses

split_on_commas() fails to work correctly for wrapped header lines:

Cc: John Doe <john.doe@subdivision.example.com>, Foo Bar
<foo.bar@subdivision.example.com>

Sup parsed this (in lib/sup/person.rb, Person.from_address_list) as:

Cc: John Doe <john.doe@subdivision.example.com>,
        foo.bar <foo.bar@subdivision.example.com>

I fixed this by normalizing the whitespace before working the
regex in split_on_commas.
lib/sup/util.rb