Skip to content

Commit 3a41f81

Browse files
committed
2 parents c625dc0 + 0dcd1c3 commit 3a41f81

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

main.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,7 @@ function updateSelection() {
207207
const thisNode = code;
208208
const fromLine = parseInt(thisNode.getAttribute('data-from-line'), 10);
209209
const toLine = parseInt(thisNode.getAttribute('data-to-line'), 10);
210-
if (
211-
(fromLine >= selectedFrom) && (fromLine <= selectedTo)
212-
||
213-
(toLine >= selectedFrom) && (toLine <= selectedTo)
214-
) {
210+
if ((fromLine <= selectedTo) && (toLine >= selectedFrom)) {
215211
code.classList.add('highlight');
216212
code.scrollIntoView({ block: 'nearest', inline: 'start' });
217213
} else {

0 commit comments

Comments
 (0)