aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/inlinepatterns.py
diff options
context:
space:
mode:
authorIsaac Muse <faceless.shop@gmail.com>2018-01-02 11:10:19 -0700
committerWaylan Limberg <waylan.limberg@icloud.com>2018-01-02 13:10:19 -0500
commit2e9beaecae75ec01899afa846f775ba7b3105ff8 (patch)
tree1f9dcc97fbc45f600886fa31b7ceab9c96800d10 /markdown/inlinepatterns.py
parentdd3e65a9d4fd77e2b656579580b97cd1f9ae0ee7 (diff)
downloadmarkdown-2e9beaecae75ec01899afa846f775ba7b3105ff8.tar.gz
markdown-2e9beaecae75ec01899afa846f775ba7b3105ff8.tar.bz2
markdown-2e9beaecae75ec01899afa846f775ba7b3105ff8.zip
Make sure regex patterns are raw strings (#614)
Python 3.6 is starting to reject invalid escapes. Regular expression patterns should be raw strings to avoid having regex escapes being mistaken for invalid string escapes. Fixes #611.
Diffstat (limited to 'markdown/inlinepatterns.py')
-rw-r--r--markdown/inlinepatterns.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py
index 2f00b3d..bfdffb3 100644
--- a/markdown/inlinepatterns.py
+++ b/markdown/inlinepatterns.py
@@ -201,7 +201,7 @@ class Pattern(object):
"""
self.pattern = pattern
- self.compiled_re = re.compile("^(.*?)%s(.*)$" % pattern,
+ self.compiled_re = re.compile(r"^(.*?)%s(.*)$" % pattern,
re.DOTALL | re.UNICODE)
# Api for Markdown to pass safe_mode into instance