fix #1216 ignore thousand separators
This commit is contained in:
parent
4ae8783d27
commit
284cb97f1c
1 changed files with 1 additions and 0 deletions
|
@ -569,6 +569,7 @@ def sort_string(string):
|
|||
string = string.replace(u'Æ', 'AE').replace(u'Ø', 'O').replace(u'Þ', 'Th')
|
||||
|
||||
#pad numbered titles
|
||||
string = re.sub('(\d),(\d{3})', '\\1\\2', string)
|
||||
string = re.sub('(\d+)', lambda x: '%010d' % int(x.group(0)), string)
|
||||
return unicodedata.normalize('NFKD', string)
|
||||
|
||||
|
|
Loading…
Reference in a new issue