-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
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
Expose Linkify validate method in Link extension #2779
Comments
Hey @georgemandis I opened a PR for this, see #2781 would this satisfy your needs? |
@bdbch I think so! That looks pretty good :) |
Great! Looking forward for the merge! |
bdbch
added a commit
that referenced
this issue
May 16, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What problem are you facing?
The autolink attribute on the Link extension is a nice idea, but in practice it's less useful due to the long list of TLDs included by Linkify. We regularly get feedback asking why our editor turns certain word combinations into links when a user forgets to enter a "space" after a period.
I recognize hamster.vodka is a valid gTLD, but we're a little tired of explaining that 😂
What’s the solution you would like to see?
I also realize this behavior is powered by Linkify. Would it be possible to amend the Link extension and expose the
validate
method it provides?https://linkify.js.org/docs/options.html#validate
That should allow us to write our own regex and just look for com|net|org.
What alternatives did you consider?
The alternative is disabling autolink, which we'll probably do in the meantime. We'd like to keep it for some of the more common gTLDs though.
Anything to add? (optional)
No response
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: