mirror of
https://github.com/xr843/Master-skill.git
synced 2026-05-10 05:16:25 +00:00
fix: slugify now correctly lowercases English names and handles spaces
This commit is contained in:
@@ -55,7 +55,8 @@ def slugify(name: str) -> str:
|
||||
pinyin_list = lazy_pinyin(name, style=Style.NORMAL)
|
||||
slug = "-".join(pinyin_list)
|
||||
else:
|
||||
slug = name.lower().replace(" ", "-")
|
||||
slug = name
|
||||
slug = slug.lower().replace(" ", "-")
|
||||
slug = "".join(c for c in slug if c.isalnum() or c == "-")
|
||||
slug = slug.strip("-")
|
||||
return slug
|
||||
|
||||
Reference in New Issue
Block a user