mirror of
https://expo.survex.com/repositories/expoweb/.git/
synced 2024-11-24 16:21:56 +00:00
python 12 fix syntax
This commit is contained in:
parent
24b73da093
commit
a0931dc088
@ -28,13 +28,13 @@ def troggle_slugify(longname):
|
||||
This function copied instact from troggle/parsers/people/py
|
||||
"""
|
||||
slug = longname.strip().lower().replace(" ","-")
|
||||
slug = re.sub('\([^\)]*\)','',slug) # remove nickname in brackets
|
||||
slug = re.sub(r'\([^\)]*\)','',slug) # remove nickname in brackets
|
||||
slug = slug.replace('é', 'e')
|
||||
slug = slug.replace('á', 'a')
|
||||
slug = slug.replace('ä', 'a')
|
||||
slug = slug.replace('&', '') # otherwise just remove the &
|
||||
slug = slug.replace(';', '') # otherwise just remove the ;
|
||||
slug = re.sub('<[^>]*>','',slug) # remove <span-lang = "hu">
|
||||
slug = re.sub(r'<[^>]*>','',slug) # remove <span-lang = "hu">
|
||||
|
||||
if len(slug) > 40: # slugfield is 50 chars
|
||||
slug = slug[:40]
|
||||
|
Loading…
Reference in New Issue
Block a user