Skip to content

Commit 24d0175

Browse files
committed
fix: Properly apply regex rules on the matching tag
Mainly avoiding noise in logs, python was using it properly
1 parent 1467f6b commit 24d0175

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

script/escapingTags.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ def print_help():
127127
# If we encounter a "<" and are not in quoted text
128128
if not in_simple_quote and not in_triple_quotes and currentChar.val == "<":
129129
# We check if it looks like a tag
130-
if re.match("[\?a-zA-Z\d]", chars[ite+1].val):
130+
if re.match(r"[?a-zA-Z\d]", chars[ite+1].val):
131131
# We found a new tag, first we are going to parse to get its name
132132
tag = [currentChar]
133133
ite += 1
134-
while re.match("[\?a-zA-Z\d]", chars[ite].val):
134+
while re.match(r"[?a-zA-Z\d]", chars[ite].val):
135135
tag += [chars[ite]]
136136
ite += 1
137137
currentChar = chars[ite]

0 commit comments

Comments
 (0)