From 3393b85c8006bbbf506621dd32cdc6f316fc362d Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Thu, 5 Mar 2026 14:01:04 +0800 Subject: [PATCH] CBZ: sort pages numerically Fixes https://github.com/johnfactotum/foliate/issues/1549 --- comic-book.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comic-book.js b/comic-book.js index 88c7a35..cf41d11 100644 --- a/comic-book.js +++ b/comic-book.js @@ -20,7 +20,7 @@ export const makeComicBook = ({ entries, loadBlob, getSize }, file) => { const files = entries .map(entry => entry.filename) .filter(name => exts.some(ext => name.endsWith(ext))) - .sort() + .sort(new Intl.Collator([], { numeric: true }).compare) if (!files.length) throw new Error('No supported image files in archive') const book = {}