diff options
author | dioexul <dioexul@gmail.com> | 2015-02-18 22:41:19 +0300 |
---|---|---|
committer | dioexul <dioexul@gmail.com> | 2015-02-18 22:41:19 +0300 |
commit | 3d75734751b36ae14feab0d84f5d670f1d6225e3 (patch) | |
tree | 8ba0ce75d922eb0df578199e07bc08795a2b06a7 | |
parent | 96fec754cc7448ac0e76697e034c26b263b73ea9 (diff) | |
download | python-slugify-3d75734751b36ae14feab0d84f5d670f1d6225e3.tar.gz |
Fix kwargs order.
-rw-r--r-- | slugify/slugify.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/slugify/slugify.py b/slugify/slugify.py index efccb23..9314154 100644 --- a/slugify/slugify.py +++ b/slugify/slugify.py @@ -23,7 +23,7 @@ REPLACE2_REXP = re.compile(r'[^-a-z0-9]+') REMOVE_REXP = re.compile('-{2,}') -def smart_truncate(string, max_length=0, word_boundaries=False, save_order=False, separator=' '): +def smart_truncate(string, max_length=0, word_boundaries=False, separator=' ', save_order=False): """Truncate a string. :param string (str): string for modification :param max_length (int): output string length @@ -64,8 +64,8 @@ def smart_truncate(string, max_length=0, word_boundaries=False, save_order=False return truncated.strip(separator) -def slugify(text, entities=True, decimal=True, hexadecimal=True, max_length=0, word_boundary=False, save_order=False, - separator='-'): +def slugify(text, entities=True, decimal=True, hexadecimal=True, max_length=0, word_boundary=False, + separator='-', save_order=False): """Make a slug from the given text. :param text (str): initial text :param entities (bool): @@ -121,7 +121,7 @@ def slugify(text, entities=True, decimal=True, hexadecimal=True, max_length=0, w # smart truncate if requested if max_length > 0: - text = smart_truncate(text, max_length, word_boundary, save_order, '-') + text = smart_truncate(text, max_length, word_boundary, '-', save_order) if separator != '-': text = text.replace('-', separator) |