diff options
-rw-r--r-- | markdown/extensions/headerid.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/extensions/headerid.py b/markdown/extensions/headerid.py index e967648..42e82b0 100644 --- a/markdown/extensions/headerid.py +++ b/markdown/extensions/headerid.py @@ -87,7 +87,7 @@ IDCOUNT_RE = re.compile(r'^(.*)_([0-9]+)$') def slugify(value, separator): """ Slugify a string, to make it URL friendly. """ value = unicodedata.normalize('NFKD', value).encode('ascii', 'ignore') - value = unicode(re.sub('[^\w\s-]', '', value).strip().lower()) + value = re.sub('[^\w\s-]', '', value.decode('ascii')).strip().lower() return re.sub('[%s\s]+' % separator, separator, value) |