Skip to content

Commit 4fcf8e7

Browse files
committed
fix #73 invalid escape sequence warnings.
1 parent f7cca82 commit 4fcf8e7

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

textile/core.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Textile(object):
4040
unrestricted_url_schemes = restricted_url_schemes + ('file', 'tel',
4141
'callto', 'sftp', 'data')
4242

43-
btag = ('bq', 'bc', 'notextile', 'pre', 'h[1-6]', 'fn\d+', 'p', '###')
43+
btag = ('bq', 'bc', 'notextile', 'pre', 'h[1-6]', r'fn\d+', 'p', '###')
4444
btag_lite = ('bq', 'bc', 'p')
4545

4646
note_index = 1
@@ -344,8 +344,8 @@ def fTextileList(self, match):
344344
except KeyError:
345345
self.olstarts[tl] = 1
346346

347-
nm = re.match("^(?P<nextlistitem>[#\*;:]+)(_|[\d]+)?{0}"
348-
"[ .].*".format(cls_re_s), nextline)
347+
nm = re.match(r"^(?P<nextlistitem>[#\*;:]+)(_|[\d]+)?{0}"
348+
r"[ .].*".format(cls_re_s), nextline)
349349
if nm:
350350
nl = nm.group('nextlistitem')
351351

@@ -829,7 +829,7 @@ def fLink(self, m):
829829
# "text":url?q[]=x][123] will have "[123]" popped off the back, the
830830
# remaining closing square brackets will later be tested for balance
831831
if (counts[']']):
832-
m = re.search('(?P<url>^.*\])(?P<tight>\[.*?)$', url, flags=re.U)
832+
m = re.search(r'(?P<url>^.*\])(?P<tight>\[.*?)$', url, flags=re.U)
833833
if m:
834834
url, tight = m.groups()
835835

@@ -1247,8 +1247,8 @@ def placeNoteLists(self, text):
12471247
# sort o by key
12481248
o = OrderedDict(sorted(o.items(), key=lambda t: t[0]))
12491249
self.notes = o
1250-
text_re = re.compile('<p>notelist({0})(?:\:([\w|{1}]))?([\^!]?)(\+?)'
1251-
'\.?[\s]*</p>'.format(cls_re_s, syms_re_s), re.U)
1250+
text_re = re.compile(r'<p>notelist({0})(?:\:([\w|{1}]))?([\^!]?)(\+?)'
1251+
r'\.?[\s]*</p>'.format(cls_re_s, syms_re_s), re.U)
12521252
text = text_re.sub(self.fNoteLists, text)
12531253
return text
12541254

0 commit comments

Comments
 (0)