mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-10-25 06:59:51 -04:00
MOBI: fix duplicated anchors
This commit is contained in:
1 parent
750458d4b7
commit
af0050aba7
1 file changed
+2
-2
@@ -725,9 +725,9 @@ class MOBI6 {
|
|||||||
// which will be used to insert anchor elements
|
// which will be used to insert anchor elements
|
||||||
// because only then can they be referenced in the DOM
|
// because only then can they be referenced in the DOM
|
||||||
this.#fileposList = [...new Set(fileposInNCX
|
this.#fileposList = [...new Set(fileposInNCX
|
||||||
.concat(Array.from(str.matchAll(fileposRegex), m => m[1]))
|
.concat(Array.from(str.matchAll(fileposRegex), m => m[1])))]
|
||||||
.map(filepos => ({ filepos, number: Number(filepos) }))
|
.map(filepos => ({ filepos, number: Number(filepos) }))
|
||||||
.sort((a, b) => a.number - b.number))]
|
.sort((a, b) => a.number - b.number)
|
||||||
|
|
||||||
this.metadata = this.mobi.getMetadata()
|
this.metadata = this.mobi.getMetadata()
|
||||||
this.getCover = this.mobi.getCover.bind(this.mobi)
|
this.getCover = this.mobi.getCover.bind(this.mobi)
|
||||||
|
|||||||
Reference in new issue
Block a user