Merge pull request #6019 from TomJGooding/fix-slug-remove-all-supplemental-symbols

fix(slug): remove all Supplemental Symbols in slug
This commit is contained in:
Will McGugan
2025-08-06 16:14:42 +01:00
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -34,10 +34,10 @@ NONLINGUAL: Final[str] = (
r"\U000024C2-\U0001F251"
r"\U00002702-\U000027B0"
r"\U0001F1E0-\U0001F1FF"
r"\U0001F300-\U0001F5FF"
r"\U0001F600-\U0001F64F"
r"\U0001F680-\U0001F6FF"
r"\U0001f926-\U0001f937"
r"\U0001F300-\U0001F5FF" # Miscellaneous Symbols And Pictographs
r"\U0001F600-\U0001F64F" # Emoticons
r"\U0001F680-\U0001F6FF" # Transport and Map Symbols
r"\U0001F900-\U0001F9FF" # Supplemental Symbols and Pictographs
r"\u200D"
r"\u2640-\u2642"
)

View File

@@ -25,6 +25,8 @@ from textual._slug import TrackedSlugs, slug
("test🙂test", "testtest"),
("test🤷test", "testtest"),
("test🤷🏻test", "testtest"),
("test🤖test", "testtest"),
("test🧠test", "testtest"),
],
)
def test_simple_slug(text: str, expected: str) -> None: