fix(manga): conserver le padding du numéro de chapitre après scraping #48

Merged
colgora merged 1 commits from fix/chapter-number-padding-after-scraping into main 2026-04-09 15:11:56 +02:00
Showing only changes of commit e214e1ea46 - Show all commits

View File

@@ -103,7 +103,9 @@ readonly class GetMangaChaptersHandler
$min = min($numbers);
$max = max($numbers);
$fmt = fn (float $n) => $n == (int) $n ? (string) (int) $n : (string) $n;
$fmt = fn (float $n) => $n == (int) $n
? str_pad((string) (int) $n, 2, '0', STR_PAD_LEFT)
: (string) $n;
$range = count($group) > 1 ? $fmt($min).'-'.$fmt($max) : $fmt($min);
return new ChapterResponse(