Skip to content

Commit

Permalink
Use raw string for matching regex in results.py
Browse files Browse the repository at this point in the history
Fixes #1144
  • Loading branch information
benbusby committed Sep 30, 2024
1 parent 6924f5c commit a016a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/utils/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def replace_any_case(element: NavigableString, target_word: str) -> None:
else:
reg_pattern = fr'\b((?![{{}}<>-]){target_word}(?![{{}}<>-]))\b'

if re.match('.*[@_!#$%^&*()<>?/\|}{~:].*', target_word) or (
if re.match(r'.*[@_!#$%^&*()<>?/\|}{~:].*', target_word) or (
element.parent and element.parent.name == 'style'):
return

Expand Down

0 comments on commit a016a1b

Please sign in to comment.