From a1543fe0ae019606bec660d6cf2e70a435ff29e4 Mon Sep 17 00:00:00 2001 From: Lucas Woltmann Date: Thu, 12 Nov 2015 11:15:58 +0100 Subject: fixed stopword replacement bug (different separators) --- slugify/slugify.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'slugify') diff --git a/slugify/slugify.py b/slugify/slugify.py index 03588a1..9eeabef 100644 --- a/slugify/slugify.py +++ b/slugify/slugify.py @@ -129,8 +129,8 @@ def slugify(text, entities=True, decimal=True, hexadecimal=True, max_length=0, w # remove stopwords if stopwords: stopwords_lower = [s.lower() for s in stopwords] - words = [w for w in text.split(separator) if w not in stopwords_lower] - text = separator.join(words) + words = [w for w in text.split('-') if w not in stopwords_lower] + text = '-'.join(words) # smart truncate if requested if max_length > 0: -- cgit v1.2.1