summaryrefslogtreecommitdiff
path: root/slugify
diff options
context:
space:
mode:
authorVal Neekman <un33kvu@gmail.com>2018-12-25 18:00:44 -0500
committerGitHub <noreply@github.com>2018-12-25 18:00:44 -0500
commit76f4eabe323653555d11702c3e53b66ebf352683 (patch)
treedeebed86a83e9710786a4ffd706f7cd5f32e0559 /slugify
parentf4462bb64278e091011e6612feac295bf46d1136 (diff)
downloadpython-slugify-76f4eabe323653555d11702c3e53b66ebf352683.tar.gz
Proper fallback to text-unidecode, favoring Unidecode, drop support for py 2.6, 3.3. (#63)2.0.0
* enable raw re pattern * conditional text_unidecode install * update readme, changelog, manifest * update ci * readme * drop test for py 2.6 and 3.3 * clean up readme * readme
Diffstat (limited to 'slugify')
-rw-r--r--slugify/__init__.py2
-rw-r--r--slugify/slugify.py10
2 files changed, 6 insertions, 6 deletions
diff --git a/slugify/__init__.py b/slugify/__init__.py
index 1a02a3e..81849b9 100644
--- a/slugify/__init__.py
+++ b/slugify/__init__.py
@@ -3,4 +3,4 @@ from .slugify import *
__author__ = 'Val Neekman @ Neekware Inc. [@vneekman]'
__description__ = 'A Python slugify application that also handles Unicode'
-__version__ = '1.2.6'
+__version__ = '2.0.0'
diff --git a/slugify/slugify.py b/slugify/slugify.py
index 192bbd3..8569233 100644
--- a/slugify/slugify.py
+++ b/slugify/slugify.py
@@ -21,14 +21,14 @@ except ImportError:
__all__ = ['slugify', 'smart_truncate']
-CHAR_ENTITY_PATTERN = re.compile('&(%s);' % '|'.join(name2codepoint))
-DECIMAL_PATTERN = re.compile('&#(\d+);')
-HEX_PATTERN = re.compile('&#x([\da-fA-F]+);')
+CHAR_ENTITY_PATTERN = re.compile(r'&(%s);' % '|'.join(name2codepoint))
+DECIMAL_PATTERN = re.compile(r'&#(\d+);')
+HEX_PATTERN = re.compile(r'&#x([\da-fA-F]+);')
QUOTE_PATTERN = re.compile(r'[\']+')
ALLOWED_CHARS_PATTERN = re.compile(r'[^-a-z0-9]+')
ALLOWED_CHARS_PATTERN_WITH_UPPERCASE = re.compile(r'[^-a-zA-Z0-9]+')
-DUPLICATE_DASH_PATTERN = re.compile('-{2,}')
-NUMBERS_PATTERN = re.compile('(?<=\d),(?=\d)')
+DUPLICATE_DASH_PATTERN = re.compile(r'-{2,}')
+NUMBERS_PATTERN = re.compile(r'(?<=\d),(?=\d)')
DEFAULT_SEPARATOR = '-'