mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
CBZ: sort pages numerically
Fixes https://github.com/johnfactotum/foliate/issues/1549
This commit is contained in:
+1
-1
@@ -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 = {}
|
||||
|
||||
Reference in New Issue
Block a user