Skip to content

Commit fe86913

Browse files
winterheartjgm
authored andcommitted
Fix python warnings about regexp escape sequences
1 parent 1e30143 commit fe86913

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/normalize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class HTMLParseError(Exception):
1818
# Normalization code, adapted from
1919
# https://github.com/karlcow/markdown-testsuite/
2020
significant_attrs = ["alt", "href", "src", "title"]
21-
whitespace_re = re.compile('\s+')
21+
whitespace_re = re.compile(r"\s+")
2222
class MyHTMLParser(HTMLParser):
2323
def __init__(self):
2424
HTMLParser.__init__(self)
@@ -176,7 +176,7 @@ def normalize_html(html):
176176
'\u2200&><"'
177177
178178
"""
179-
html_chunk_re = re.compile("(\<!\[CDATA\[.*?\]\]\>|\<[^>]*\>|[^<]+)")
179+
html_chunk_re = re.compile(r"(\<!\[CDATA\[.*?\]\]\>|\<[^>]*\>|[^<]+)")
180180
try:
181181
parser = MyHTMLParser()
182182
# We work around HTMLParser's limitations parsing CDATA

0 commit comments

Comments
 (0)