Comments (3)
Hi @riz0id, the whitespace in the grammar is the "CFWS" production. It is optionally allowed in local-part
(the left hand side of the email) via:
local-part = dot-atom / quoted-string / obs-local-part
dot-atom = [CFWS] dot-atom-text [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
atom = [CFWS] 1*atext [CFWS]
The removal of CFWS when canonicalizing is due to the paragraph after these productions (my highlighting):
Both atom and dot-atom are interpreted as a single unit, comprising the string of characters that make it up. Semantically, the optional comments and FWS surrounding the rest of the characters are not part of the atom; the atom is only the run of atext characters in an atom, or the atext and "." characters in a dot-atom.
from email-validate-hs.
Note that removing spaces & comments from the email address is basically all that canonicalizeEmail
does. So if you don't want this, you can instead use the isValid
or validate
functions and keep around the original ByteString
.
from email-validate-hs.
Okay thanks.
from email-validate-hs.
Related Issues (20)
- Create a joint test suite with hsemail HOT 2
- Why does Text.Email.Parser call a parser on its intermediate results? HOT 5
- quasiquoter? HOT 3
- Cabal homepage URL is returning a 404 HOT 2
- Consider adding PathPiece instance? HOT 3
- Major version changes (v3) HOT 4
- Add NFData and Binary instances to EmailAddress HOT 2
- Allow testing with doctest-0.15 HOT 4
- Allow testing with hspec-2.5 HOT 1
- Use case-insensitive ByteString in EmailAddress HOT 2
- Quotes-wrapped `Show` intentional? HOT 3
- Zero width characters
- Status of v3 and offer of help HOT 1
- Please relax version constraint on 'template-haskell' to support ghc-8.10.1 HOT 2
- Fail on dotless domain names
- testsuite failing in Stackage Nightly HOT 4
- The package is disabled in Stackage HOT 4
- Create EmailAdress or validate String HOT 1
- hspec-2.11 not accepted
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from email-validate-hs.