From a016a1bcf4ce1b55337451d6dedd4ded7f9fe287 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 30 Sep 2024 11:41:13 -0600 Subject: [PATCH] Use raw string for matching regex in results.py Fixes #1144 --- app/utils/results.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/results.py b/app/utils/results.py index 7b2f5f2..1b69d81 100644 --- a/app/utils/results.py +++ b/app/utils/results.py @@ -99,7 +99,7 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup: 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