Run lint & format

This commit is contained in:
Andras Schmelczer 2026-03-10 20:53:14 +00:00
parent be6e861ee7
commit 665cdb2881
3 changed files with 143 additions and 5 deletions

View file

@ -28,7 +28,10 @@ async function main(): Promise<void> {
rightTextArea.addEventListener('input', scheduleUpdate);
document.addEventListener('selectionchange', () => {
if (document.activeElement === leftTextArea || document.activeElement === rightTextArea) {
if (
document.activeElement === leftTextArea ||
document.activeElement === rightTextArea
) {
scheduleUpdate();
}
});
@ -112,7 +115,11 @@ function updateMergedText(): void {
for (const character of text) {
let className = history;
if (!isDelete && selectionStart <= currentPosition && currentPosition < selectionEnd) {
if (
!isDelete &&
selectionStart <= currentPosition &&
currentPosition < selectionEnd
) {
className += ` selection-${selectionSide}`;
}