Open JaSpa opened 3 years ago
@JaSpa Thanks for point this out. localPartP
does indeed peek at the character following the local part and verifies that it is a "@
" character. IIRC I did this because of some weird edge case with obsolete local parts. I'll play with the code and see if I can lift this restriction.
I needed to parse only localparts of mail addresses and came across this library but realized that it wasn't working as I thought it would:
But I also know that the
@
is not consumed bylocalPartP
because this parser succeeds:So I don't know if this is to be considered a bug or if
localPartP
needs documentation that it can only succeed if it is followed by a@
.For my use case this won't be a blocker either way since I decided to parse only a restricted form of localparts and use your nice library to do validation afterwards.