add sortvalue to annotations to get better sort by text results
This commit is contained in:
parent
a960a7bd18
commit
7eeb6dc107
4 changed files with 9 additions and 5 deletions
|
|
@ -21,7 +21,8 @@ def plural_key(term):
|
|||
|
||||
|
||||
def sort_string(string):
|
||||
string = string.replace(u'Þ', 'Th')
|
||||
string = string.replace(u'Æ', 'AE').replace(u'Ø', 'O').replace(u'Þ', 'Th')
|
||||
|
||||
#pad numbered titles
|
||||
string = re.sub('(\d+)', lambda x: '%010d' % int(x.group(0)), string)
|
||||
return unicodedata.normalize('NFKD', string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue