mirror of
https://github.com/benbusby/whoogle-search.git
synced 2025-08-05 08:42:18 -04:00
Use f-string in bold query regex
by @DUOLabs333
This commit is contained in:
parent
f154b5f2e2
commit
591ed4a6d6
@ -53,7 +53,7 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup:
|
||||
return
|
||||
|
||||
element.replace_with(
|
||||
re.sub(r'\b((?![{}<>-])' + target_word + r'(?![{}<>-]))\b',
|
||||
re.sub(fr'\b((?![{{}}<>-]){target_word}(?![{{}}<>-]))\b',
|
||||
r'<b>\1</b>',
|
||||
element,
|
||||
flags=re.I)
|
||||
|
Loading…
x
Reference in New Issue
Block a user