diff --git a/README.md b/README.md index 2a68581..1a00a9f 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,9 @@ assert slugify("C'est déjà l'été.", algorithm='modern') == 'c-est-deja-l-ete assert slugify('影師嗎', backend='text-unidecode', algorithm='modern') == 'ying-shi-ma' assert slugify('影師嗎', allow_unicode=True, algorithm='modern') == '影師嗎' +# Truncate long slugs with max_length. +assert slugify('Hello, world!', max_length=8) == 'hello-wo' + # Calling slugify() without algorithm uses the legacy pipeline (the old default), # kept unchanged for backward compatibility. assert slugify("C'est déjà l'été.") == 'c-est-deja-l-ete'