mirror of
https://github.com/benbusby/whoogle-search.git
synced 2026-03-11 08:54:34 +00:00
Use f-string in bold query regex
by @DUOLabs333
This commit is contained in:
parent
f154b5f2e2
commit
591ed4a6d6
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Reference in a new issue