From 082040beacdcd692083a41a32d36d79baa341bd1 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 19 May 2020 21:58:25 -0700 Subject: [PATCH] Replace multiple underscores with single underscore in anchor slugs. --- voussoir.net/writing/vmarkdown.py | 1 + 1 file changed, 1 insertion(+) diff --git a/voussoir.net/writing/vmarkdown.py b/voussoir.net/writing/vmarkdown.py index a2afe70..355691b 100644 --- a/voussoir.net/writing/vmarkdown.py +++ b/voussoir.net/writing/vmarkdown.py @@ -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):