fix up tests and related issues

This commit is contained in:
Jonathan Wren 2020-02-29 14:44:42 -08:00
parent 47e0305aa0
commit 4d768ae433
No known key found for this signature in database
GPG key ID: 43D5FF8722E7F68A
4 changed files with 9 additions and 63 deletions

View file

@ -226,13 +226,9 @@ def highlight_tags_with_background_color(entry, text, color, is_title=False):
if config["highlight"]: # highlight tags
if entry.journal.search_tags:
text_fragments = []
for tag in entry.search_tags:
for tag in entry.journal.search_tags:
text_fragments.extend(
re.split(
re.compile(re.escape(tag), re.IGNORECASE),
text,
flags=re.UNICODE,
)
re.split(re.compile(re.escape(tag), re.IGNORECASE), text)
)
else:
text_fragments = re.split(entry.tag_regex(config["tagsymbols"]), text)