From 399248a67a8862ffb5e6463a33f9d52b317ca2eb Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Thu, 5 Mar 2026 16:36:03 +0800 Subject: [PATCH] Run `eslint --fix` --- epubcfi.js | 2 +- tests/epubcfi-tests.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/epubcfi.js b/epubcfi.js index a78f682..712ead5 100644 --- a/epubcfi.js +++ b/epubcfi.js @@ -262,7 +262,7 @@ const nodeToParts = (node, offset, filter) => { while (filter && parentNode && parentNode !== node.ownerDocument.documentElement && filter(parentNode) === NodeFilter.FILTER_SKIP) - parentNode = parentNode.parentNode + parentNode = parentNode.parentNode const indexed = indexChildNodes(parentNode, filter) const index = indexed.findIndex(x => Array.isArray(x) ? x.some(x => x === node) : x === node) diff --git a/tests/epubcfi-tests.js b/tests/epubcfi-tests.js index d498cbd..b047a5d 100644 --- a/tests/epubcfi-tests.js +++ b/tests/epubcfi-tests.js @@ -164,7 +164,7 @@ const XHTML = str => parser.parseFromString(str, 'application/xhtml+xml') const filter = node => node.nodeType === 1 && node.classList?.contains('SKIP') ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT - + // cfi1 const para1 = page.getElementById('test-skip-1') const text1 = para1.firstChild @@ -175,7 +175,7 @@ const XHTML = str => parser.parseFromString(str, 'application/xhtml+xml') const expected1 = 'epubcfi(/4/2[test-skip-1],/1:3,/1:8)' console.assert(cfi1 === expected1, `expected ${expected1}, got ${cfi1}`) - + // cfi2 const para2 = page.getElementById('test-skip-2')