aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/inlinepatterns.py
diff options
context:
space:
mode:
authord9pouces <github@19pouces.net>2017-07-25 08:30:05 +0200
committerWaylan Limberg <waylan.limberg@icloud.com>2017-07-25 08:20:21 -0400
commita1c200899c942a8e37880c2b3c59e02770ade7ac (patch)
treeca66fc774e180f030c26d207902891bfe1559340 /markdown/inlinepatterns.py
parentb7db1ec1d1e940dec46e24639bbd8c34d6d853d9 (diff)
downloadmarkdown-a1c200899c942a8e37880c2b3c59e02770ade7ac.tar.gz
markdown-a1c200899c942a8e37880c2b3c59e02770ade7ac.tar.bz2
markdown-a1c200899c942a8e37880c2b3c59e02770ade7ac.zip
fix DeprecationWarning: invalid escape sequence
Diffstat (limited to 'markdown/inlinepatterns.py')
-rw-r--r--markdown/inlinepatterns.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py
index 218b416..f9d0610 100644
--- a/markdown/inlinepatterns.py
+++ b/markdown/inlinepatterns.py
@@ -140,7 +140,7 @@ REFERENCE_RE = NOIMG + BRK + r'\s?\[([^\]]*)\]'
SHORT_REF_RE = NOIMG + r'\[([^\]]+)\]'
# ![alt text][2]
-IMAGE_REFERENCE_RE = r'\!' + BRK + '\s?\[([^\]]*)\]'
+IMAGE_REFERENCE_RE = r'\!' + BRK + r'\s?\[([^\]]*)\]'
# stand-alone * or _
NOT_STRONG_RE = r'((^| )(\*|_)( |$))'
@@ -170,7 +170,7 @@ def dequote(string):
return string
-ATTR_RE = re.compile("\{@([^\}]*)=([^\}]*)}") # {@id=123}
+ATTR_RE = re.compile(r"\{@([^\}]*)=([^\}]*)}") # {@id=123}
def handleAttributes(text, parent):
@@ -351,7 +351,7 @@ class HtmlPattern(Pattern):
try:
return self.markdown.serializer(value)
except:
- return '\%s' % value
+ return r'\%s' % value
return util.INLINE_PLACEHOLDER_RE.sub(get_stash, text)