Run eslint --fix

This commit is contained in:
John Factotum
2026-03-05 16:36:03 +08:00
parent 1217096245
commit 399248a67a
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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)
+2 -2
View File
@@ -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')