Skip to content

Commit 81c322e

Browse files
committed
EPUB: Get page number from epub:type="pagebreak" aria-label
In addition to title. https://forums.zotero.org/discussion/131458/epub-page-number-isnt-recognized-by-zotero (cherry picked from commit e1a0992)
1 parent d6f5908 commit 81c322e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/dom/epub/lib/page-mapping.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class PageMapping {
4747
return mapping;
4848
}
4949

50-
static readonly VERSION = 13;
50+
static readonly VERSION = 14;
5151

5252
private readonly _tree = new BTree<PersistentRange, string>(
5353
undefined,
@@ -290,7 +290,9 @@ const MATCHERS: Matcher[] = [
290290

291291
{
292292
selector: '[*|type="pagebreak"]',
293-
extract: el => el.getAttribute('title') ?? undefined
293+
extract: el => el.getAttribute('title')
294+
?? el.getAttribute('aria-label')
295+
?? undefined
294296
}
295297
];
296298

0 commit comments

Comments
 (0)