From a12b6d043c657eb2dc419d232f7dd0ab57070258 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 5 Aug 2009 09:14:12 -0600 Subject: [PATCH] Fix sorting by title to correctly handle cases like The Thexxx --- src/calibre/ebooks/metadata/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/ebooks/metadata/__init__.py b/src/calibre/ebooks/metadata/__init__.py index 7b2f5e6960..332ae79afb 100644 --- a/src/calibre/ebooks/metadata/__init__.py +++ b/src/calibre/ebooks/metadata/__init__.py @@ -41,7 +41,7 @@ def title_sort(title): match = _title_pat.search(title) if match: prep = match.group(1) - title = title.replace(prep, '') + ', ' + prep + title = title[len(prep):] + ', ' + prep return title.strip() coding = zip(