From d5f5645e2cd7f197f1fe068021bfa150faac7417 Mon Sep 17 00:00:00 2001 From: DUO Labs Date: Wed, 27 Oct 2021 21:52:21 -0400 Subject: [PATCH] Change "skip bolding" check to regex to fix some edge cases --- 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 c239a28..c2fb38e 100644 --- a/app/utils/results.py +++ b/app/utils/results.py @@ -52,7 +52,7 @@ def bold_search_terms(response: str, query: str) -> BeautifulSoup: if len(element) == len(target_word): return - if not target_word.isalnum(): + if not re.match('.*[a-zA-Z0-9].*', target_word): return element.replace_with(