We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using the linkExtension, if I use a text in the following form : From : John Smith <john.smith@test.com>
The "<" symbol is considered to be part of the email address
Paste this into a remirror rich text using the link extension : From : John Smith <john.smith@test.com>
The detected email address should be "john.smith@test.com"
The detected email address is "<john.smith@test.com" (which is invalid)
I modified the autoLinkRegex to use this instead :
/(?:(?:(?:https?|ftp):)?\/\/)?(?:[\w.\-+]+(?::[\w.\-+]*)?@)?(?:(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)*(?:(?:\d(?!\.)|[a-z\u00A1-\uFFFF])(?:[\da-z\u00A1-\uFFFF][\w\u00A1-\uFFFF-]{0,62})?[\da-z\u00A1-\uFFFF]\.)+[a-z\u00A1-\uFFFF]{2,}(?::\d{2,5})?(?:[#/?]\S*)?/gi,
The only changes being using [\w.\-+] instead of \S (twice) before the "@"
[\w.\-+]
\S
The text was updated successfully, but these errors were encountered:
It may be possible to have a wider range of allowed characters than [\w.-+], but this worked for all of my use cases for now.
Sorry, something went wrong.
No branches or pull requests
Summary
When using the linkExtension, if I use a text in the following form :
From : John Smith <john.smith@test.com>
The "<" symbol is considered to be part of the email address
Steps to reproduce
Paste this into a remirror rich text using the link extension :
From : John Smith <john.smith@test.com>
Expected results
The detected email address should be "john.smith@test.com"
Actual results
The detected email address is "<john.smith@test.com" (which is invalid)
Possible Solution
I modified the autoLinkRegex to use this instead :
The only changes being using
[\w.\-+]
instead of\S
(twice) before the "@"The text was updated successfully, but these errors were encountered: