mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Fix #8539 (Author sort default should not put Inc. at the front for companies)
This commit is contained in:
parent
bb19d8525b
commit
b88fcdb8af
@ -36,9 +36,10 @@ def author_to_author_sort(author):
|
|||||||
return author
|
return author
|
||||||
author = _bracket_pat.sub('', author).strip()
|
author = _bracket_pat.sub('', author).strip()
|
||||||
tokens = author.split()
|
tokens = author.split()
|
||||||
tokens = tokens[-1:] + tokens[:-1]
|
if tokens[-1] not in ('Inc.', 'Inc'):
|
||||||
if len(tokens) > 1 and method != 'nocomma':
|
tokens = tokens[-1:] + tokens[:-1]
|
||||||
tokens[0] += ','
|
if len(tokens) > 1 and method != 'nocomma':
|
||||||
|
tokens[0] += ','
|
||||||
return ' '.join(tokens)
|
return ' '.join(tokens)
|
||||||
|
|
||||||
def authors_to_sort_string(authors):
|
def authors_to_sort_string(authors):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user