Use raw string for matching regex in results.py

Fixes #1144
main
Ben Busby 2024-09-30 11:41:13 -06:00
parent 6924f5ce0d
commit a016a1bcf4
No known key found for this signature in database
GPG Key ID: B9B7231E01D924A1
1 changed files with 1 additions and 1 deletions

View File

@ -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