fix: Spurious link appears when typing enter at the end of a list with a mention (#11238)

This commit is contained in:
Tom Moor
2026-01-22 11:23:36 -05:00
committed by GitHub
parent 86811a5556
commit 3df2d362b6
+6 -1
View File
@@ -267,7 +267,12 @@ export default class Link extends Mark {
return false;
}
const textContent = selection.$from.parent.textContent;
let textContent = "";
selection.$from.parent.forEach((node) => {
if (node.isText && node.text) {
textContent += node.text;
}
});
const words = textContent.split(/\s+/);
if (!words.length) {
return false;