From 95b39ba5431539c31bda66cfef01886c19ede9b4 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Thu, 29 Aug 2024 13:37:56 -0400 Subject: [PATCH] EPUB: Don't treat pagetop/pagebottom as page numbers --- src/dom/epub/lib/page-mapping.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dom/epub/lib/page-mapping.ts b/src/dom/epub/lib/page-mapping.ts index 82479af8..bac0ad55 100644 --- a/src/dom/epub/lib/page-mapping.ts +++ b/src/dom/epub/lib/page-mapping.ts @@ -46,7 +46,7 @@ class PageMapping { return mapping; } - static readonly VERSION = 9; + static readonly VERSION = 10; readonly tree = new BTree( undefined, @@ -191,7 +191,7 @@ type Matcher = { const MATCHERS: Matcher[] = [ { - selector: '[id*="page" i]:empty', + selector: '[id*="page" i]:not(#pagetop):not(#pagebottom):empty', extract: el => el.id.replace(/page[-_]?/i, '').replace(/^(.*_)+/, '') },