From e29552fd11fd0d6b797651822c0b5156c344c0df Mon Sep 17 00:00:00 2001 From: DUO Labs Date: Tue, 26 Oct 2021 18:07:15 -0400 Subject: [PATCH] Fixed some other issues with the new regex system --- app/utils/results.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/results.py b/app/utils/results.py index 7269ca7..c6af2cc 100644 --- a/app/utils/results.py +++ b/app/utils/results.py @@ -53,7 +53,7 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup: # Replace all instances of the word, but maintaining the same case in # the replacement element.replace_with( - re.sub(fr"\b({target_word})\b",r"\1",element,flags=re.I) + re.sub(fr"\b[^-<>{{}}]({target_word})\b",r" \1",element,flags=re.I) ) # Split all words out of query, grouping the ones wrapped in quotes