parent
f154b5f2e2
commit
591ed4a6d6
|
@ -53,7 +53,7 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup:
|
||||||
return
|
return
|
||||||
|
|
||||||
element.replace_with(
|
element.replace_with(
|
||||||
re.sub(r'\b((?![{}<>-])' + target_word + r'(?![{}<>-]))\b',
|
re.sub(fr'\b((?![{{}}<>-]){target_word}(?![{{}}<>-]))\b',
|
||||||
r'<b>\1</b>',
|
r'<b>\1</b>',
|
||||||
element,
|
element,
|
||||||
flags=re.I)
|
flags=re.I)
|
||||||
|
|
Loading…
Reference in New Issue