From 281f626e8c0621e64e2ff2e4bb2fab0482973c09 Mon Sep 17 00:00:00 2001 From: Alex Ling Date: Thu, 16 Jul 2020 13:17:58 +0000 Subject: [PATCH] More tie-breaking --- src/library/title.cr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/library/title.cr b/src/library/title.cr index 4d918b6..22f75d3 100644 --- a/src/library/title.cr +++ b/src/library/title.cr @@ -299,7 +299,8 @@ class Title end sorter = ChapterSorter.new @entries.map { |e| e.title } ary = @entries.sort do |a, b| - sorter.compare a.title, b.title + sorter.compare(a.title, b.title).or \ + compare_numerically a.title, b.title end end