Merge branch 'master' of github.com:eeriks/erepublik_script

This commit is contained in:
Eriks Karls 2019-08-27 10:17:34 +03:00
commit 53266b1c94

View File

@ -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)