mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
1a295d31cf
commit
215347679a
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user