This commit is contained in:
Kovid Goyal 2010-08-24 12:33:35 -06:00
parent 1a295d31cf
commit 215347679a

View File

@ -49,6 +49,7 @@ _title_pat = re.compile('^(A|The|An)\s+', re.IGNORECASE)
_ignore_starts = u'\'"'+u''.join(unichr(x) for x in range(0x2018, 0x201e)+[0x2032, 0x2033]) _ignore_starts = u'\'"'+u''.join(unichr(x) for x in range(0x2018, 0x201e)+[0x2032, 0x2033])
def title_sort(title): def title_sort(title):
title = title.strip()
if title and title[0] in _ignore_starts: if title and title[0] in _ignore_starts:
title = title[1:] title = title[1:]
match = _title_pat.search(title) match = _title_pat.search(title)