Replace with - everywhere

This commit is contained in:
Nikhil Badyal
2023-12-16 11:32:42 +05:30
parent b5b6333cf6
commit e75e591ba9
+1 -1
View File
@@ -134,7 +134,7 @@ def slugify(string: str) -> str:
modified_string = string.lower()
# Remove special characters
modified_string = re.sub(r"[^\w\s-]", "", modified_string)
modified_string = re.sub(r"[^\w\s-]", "-", modified_string)
# Replace spaces with dashes
modified_string = re.sub(r"\s+", "-", modified_string)