purebred-mua / purebred-email

A fast email parsing library implemented in Haskell
https://hackage.haskell.org/package/purebred-email
GNU Affero General Public License v3.0
23 stars 4 forks source link

Whitespaces between `word`s in `phrase` #27

Closed talanis85 closed 5 years ago

talanis85 commented 5 years ago

Hello, everyone!

I think, the phrase parser is missing out on spaces between words.

Example: The display name in John Doe <jdoe@example.com> should parse to "John Doe" instead of "JohnDoe".

From RFC 5322, Section 3.2.2:

Runs of FWS, comment, or CFWS that occur between lexical tokens in a structured header field are semantically interpreted as a single space character.