From a18826f440d0b74e536f5e32ebdcf30e720f20d8 Mon Sep 17 00:00:00 2001 From: Dave Nicolson Date: Sat, 27 Jan 2024 20:37:43 +0100 Subject: [PATCH] Fix Python 3.12 SyntaxWarning --- slugify/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slugify/__init__.py b/slugify/__init__.py index 9ddd452..b8ae062 100644 --- a/slugify/__init__.py +++ b/slugify/__init__.py @@ -81,7 +81,7 @@ def slugify(s, ok=SLUG_OK, lower=True, spaces=False, only_ascii=False, space_rep if not spaces: if space_replacement and space_replacement not in ok: space_replacement = ok[0] if ok else '' - new = re.sub('[%s\s]+' % space_replacement, space_replacement, new) + new = re.sub(r'[%s\s]+' % space_replacement, space_replacement, new) if lower: new = new.lower()