Fix #8539 (Author sort default should not put Inc. at the front for companies)

This commit is contained in:
Kovid Goyal 2011-01-27 10:39:42 -07:00
parent bb19d8525b
commit b88fcdb8af

View File

@ -36,9 +36,10 @@ def author_to_author_sort(author):
return author
author = _bracket_pat.sub('', author).strip()
tokens = author.split()
tokens = tokens[-1:] + tokens[:-1]
if len(tokens) > 1 and method != 'nocomma':
tokens[0] += ','
if tokens[-1] not in ('Inc.', 'Inc'):
tokens = tokens[-1:] + tokens[:-1]
if len(tokens) > 1 and method != 'nocomma':
tokens[0] += ','
return ' '.join(tokens)
def authors_to_sort_string(authors):