From 487ba95669591aa41ba04cbdf6109c78b099e3dc Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Thu, 17 Aug 2023 11:24:32 +1200 Subject: [PATCH] =?UTF-8?q?wind:=20Don=E2=80=99t=20use=20invalid=20escape?= =?UTF-8?q?=20sequences?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joseph Sutton --- lib/wind/gen-punycode-examples.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/wind/gen-punycode-examples.py b/lib/wind/gen-punycode-examples.py index f2eddbb37..e90abd697 100644 --- a/lib/wind/gen-punycode-examples.py +++ b/lib/wind/gen-punycode-examples.py @@ -61,10 +61,10 @@ while True: l2 = re.sub('^ *', '', l2) l = l[:-2] + l2 if start: - if re.match('7\.2', l): + if re.match(r'7\.2', l): start = False else: - m = re.search('^ *\([A-Z]\) *(.*)$', l); + m = re.search(r'^ *\([A-Z]\) *(.*)$', l); if m: desc = m.group(1) codes = [] @@ -77,7 +77,7 @@ while True: if m: cases.append([codes, m.group(1), desc]) else: - if re.match('^7\.1', l): + if re.match(r'^7\.1', l): start = True cases = [] @@ -114,7 +114,7 @@ for x in cases: examples_c.file.write( " {%u, {%s}, \"%s\", \"%s\"},\n" % (len(cp), - ",".join([re.sub('[uU]\+', '0x', x) for x in cp]), + ",".join([re.sub(r'[uU]\+', '0x', x) for x in cp]), pc, desc))