[lexical-markdown] Bug Fix: Prevent nesting links creation#8164
[lexical-markdown] Bug Fix: Prevent nesting links creation#8164etrepum merged 1 commit intofacebook:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
An alternative approach would be that the shortcut still works in these scenarios but it would split the parent link accordingly. Might make sense in the case where AutoLinkNode is involved especially when it's marked as disabled. The transform should probably handle that edge case better (removing disabled AutoLinkNode when they are sufficiently changed to no longer parse as a link). |
I think the case with AutoLinkNode disabled would be better handled in AutoLinkExtension, because now, with unlinked autolink, you can write any text inside, unlike when the node is linked. Currently, it seems that valid text checking is disabled if the node is unlinked. I think it's right to check the valid text for AutoLinkNode regardless of the linked/unlinked state Screen.Recording.2026-02-23.at.23.49.44.mov |
|
Yes, the transform in the AutoLink extension is what I was referring to in that comment. Not strictly relevant to this transform which is why I thought it made sense to approve and merge as-is |
Description
Fix for behavior where it is possible to create nested links by typing markdown link text inside LinkNode
https://spec.commonmark.org/0.31.2/#example-518
Test plan
Before
Screen.Recording.2026-02-23.at.16.54.29.mov
After
Screen.Recording.2026-02-23.at.16.56.55.mov