Repository navigation
Release 9.2.0: keep combining marks and in-word joiners in modern Unicode slugs (#214) - #215
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #214.
What
With
algorithm='modern'andallow_unicode=True, combining marks (Unicode Mn/Mc: vowel signs, viramas, anusvara, Arabic harakat, Hebrew niqqud, etc.) are now kept as part of the word they follow, and ZWNJ/ZWJ (U+200C/U+200D) are kept when they sit between two word parts. Previously[\W_]+treated those marks as separators and split words apart.नमस्ते दुनियानमस-त-द-न-यनमस्ते-दुनियाශ්රී ලංකාවශ-ර-ල-ක-වශ්රී-ලංකාවবাংলা ভাষাব-ল-ভ-ষবাংলা-ভাষাשָׁלוֹם עוֹלָםש-לו-םשָׁלוֹם-עוֹלָםThe rule is category-based, so it applies to every affected script; tests cover Hindi, Tamil, Bengali, Gurmukhi, Telugu, Thai, Khmer, Myanmar, Sinhala (with ZWJ), Arabic, Hebrew and Persian (ZWNJ).
Compatibility
slugify/_legacy.pyandtests/test_legacy.pyare untouched.regex_patternare unchanged.[\W_]+across every non-surrogate code point (>1M).Release 9.2.0
Bumps
__version__,tools/check_dist.pyandCHANGELOG.md(credit: Nipuna-Lakruwan, #214).Verification
tools/check_algorithms.pycleantools/check_dist.py: wheel and sdist 9.2.0 metadata, contents, install, CLI and Unicode-only runtime PASS🚀 Generated with Dojo ⛩️