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

Keep `word`s in a `phrase` separated by whitespace. #28

Closed talanis85 closed 5 years ago

talanis85 commented 5 years ago

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.

When folding words into a phrase, we have to re-insert these single spaces.

Example: In the address John Doe <jdoe@example.com>, the display name should parse as John Doe instead of JohnDoe.

Fixes #27

romanofski commented 5 years ago

Seems like you hit the same snag I hit with my pull request. Not sure what @frasertweedale wants to do about the ghc-8.8 build. Great contribution!!

frasertweedale commented 5 years ago

Ignore it and merge :) Thank you @talanis85. Will cut a new release after the other active PR gets merged.