Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow semicolon separator #38

Open
wyckster opened this issue Apr 3, 2018 · 2 comments
Open

Allow semicolon separator #38

wyckster opened this issue Apr 3, 2018 · 2 comments

Comments

@wyckster
Copy link

wyckster commented Apr 3, 2018

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

"Smith, Alice" <[email protected]>; "Jones, Bob" <[email protected]>

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
Copy link

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

  • Accumulate the parsed addresses
  • Take the remaining substring after the matched results
  • if empty, break
  • if it starts with a wanted separator (;), continue. Otherwise, fail
  • restart this loop by calling parseAddressList() again with the remaining substring

@jackbearheart
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants