parent
1abd040428
commit
d8dcdc7455
|
@ -52,6 +52,9 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup:
|
|||
if len(element) == len(target_word):
|
||||
return
|
||||
|
||||
if not target_word.isalnum():
|
||||
return
|
||||
|
||||
element.replace_with(
|
||||
re.sub(fr'\b((?![{{}}<>-]){target_word}(?![{{}}<>-]))\b',
|
||||
r'<b>\1</b>',
|
||||
|
|
Loading…
Reference in New Issue