mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-08-09 10:22:51 +03:00
Lexical: Added dark mode styles, fixed autolink range
This commit is contained in:
@@ -24,7 +24,7 @@ describe('Auto-link service tests', () => {
|
||||
pNode.append(text);
|
||||
$getRoot().append(pNode);
|
||||
|
||||
text.select(35, 35);
|
||||
text.select(34, 34);
|
||||
});
|
||||
|
||||
editor.commitUpdates();
|
||||
@@ -62,7 +62,7 @@ describe('Auto-link service tests', () => {
|
||||
pNode.append(text);
|
||||
$getRoot().append(pNode);
|
||||
|
||||
text.select(35, 35);
|
||||
text.select(34, 34);
|
||||
});
|
||||
|
||||
editor.commitUpdates();
|
||||
|
@@ -27,7 +27,7 @@ function handlePotentialLinkEvent(node: TextNode, selection: BaseSelection, edit
|
||||
return;
|
||||
}
|
||||
|
||||
const cursorPoint = selectionRange[0].offset - 1;
|
||||
const cursorPoint = selectionRange[0].offset;
|
||||
const nodeText = node.getTextContent();
|
||||
const rTrimText = nodeText.slice(0, cursorPoint);
|
||||
const priorSpaceIndex = rTrimText.lastIndexOf(' ');
|
||||
|
Reference in New Issue
Block a user