-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[lexical][auto-link] Fix auto link crash editor #6433
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
It would probably be a good idea to add a unit test suite for this sort of thing, e2e is a bit overkill to test a regex |
I agree with Bob here, these should be perfectly fine to be unit tests, otherwise LGTM. |
hi @etrepum @ivailop7 thanks for the review, the e2e tests for the Autolink node have existed for quite a while (added probably here #1156) but they didn’t cover all use cases specifically for the Autolink node created for a recognized email pattern. The way the text is transformed to an Autolink node is spread in multiple functions, it’s a bit complicated and not easy to troubleshoot. In this diff (besides the bug fix) I’m just covering all possible positive and negative use cases for the whole autolink creation/update flow transformed from a text email pattern. So I would suggest keeping the e2e tests as it might be not sufficient to cover the functions with unit tests. :) wdyt? |
Fixed bug introduced in #6146. Improving the way a potential top-level domain is parsed for email autolinks. Adding more e2e tests, apparently the email auto-link use case wasn't covered by tests.
Closes #6430
Before
Screen.Recording.2024-07-19.at.18.32.12.mov
After
Screen.Recording.2024-07-19.at.18.32.44.mov