jackbearheart / email-addresses

An RFC 5322 email address parser
MIT License
249 stars 36 forks source link

Allow semicolon separator #38

Open wyckster opened 6 years ago

wyckster commented 6 years ago

When I cut and paste an address list from Outlook it comes in with a semicolon delimiter like this:

"Smith, Alice" <alice@alpha.com>; "Jones, Bob" <bob@alpha.com>

So I'd like it if email-addresses would tolerate either a , or ; separated list. But currently it requires a comma-separated list.

I would just blindly replace semicolons with commas, except that I'm worried about semicolons appearing in quoted names, so it would be best if they would get parsed properly by email-addresses.

berniegp commented 4 years ago

Note to whoever wants to do this: this can already be done by parsing with parseAddressList() and partial: true.

jackbearheart commented 4 years ago

Happy to accept a PR that adds an option for the address-list production to use , or ; as a delimiter instead of just ,.