Merge branch 'master' of github.com:eeriks/erepublik_script
This commit is contained in:
commit
53266b1c94
@ -330,5 +330,5 @@ def slugify(value, allow_unicode=False) -> str:
|
|||||||
value = unicodedata.normalize('NFKC', value)
|
value = unicodedata.normalize('NFKC', value)
|
||||||
else:
|
else:
|
||||||
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
|
value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore').decode('ascii')
|
||||||
value = re.sub(r'[^\w\s-]', '', value).strip().lower()
|
value = re.sub(r'[^\w\s-]', '_', value).strip().lower()
|
||||||
return re.sub(r'[-\s]+', '-', value)
|
return re.sub(r'[-\s]+', '-', value)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user