-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
refactor: adjust validate and add shouldAutoLink to improve URL handling #5808
Conversation
🦋 Changeset detectedLatest commit: 585f6ef The changes in this PR will be included in the next version bump. This PR includes changesets to release 55 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for tiptap-embed ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@guarmo I can't afford to look into this carefully right now, but does this PR implement the proposed solution by @nperez0111 mentioned here (an older PR that aims to fix the same issue). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once you've got that. This is gtg
What about backward compatibility? For example, what if someone previously only wanted to autolink URLs starting with
With the current change, only URLs starting with https:// would be valid, which is not the same behavior as before. |
Yep, you are totally right here. Good catch, will have to look into how it can be kept backwards compatible |
Changes Overview
Added a new
shouldAutoLink
function to control the auto-linking of URLs based on specific criteria, such as disallowed domains, and enhanced the existingvalidate
function to handle URLs more robustly.Testing Done
Checklist
Related Issues
#5564