Replace multiple underscores with single underscore in anchor slugs.

This commit is contained in:
Ethan Dalool 2020-05-19 21:58:25 -07:00
parent 3d93608bff
commit 082040beac

View file

@ -402,6 +402,7 @@ def slugify(text):
text = text.replace(' ', '_')
text = [c for c in text if c in SLUG_CHARACTERS]
text = ''.join(text)
text = re.sub(r'_{2,}', '_', text)
return text
def uniqify_slug(slug, used_slugs):