mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-29 22:16:13 +02:00
Properly display entries during a tag search. (#902)
This commit is contained in:
parent
f57dcf5cab
commit
aece970751
2 changed files with 11 additions and 1 deletions
|
@ -228,7 +228,7 @@ def highlight_tags_with_background_color(entry, text, color, is_title=False):
|
|||
text_fragments = []
|
||||
for tag in entry.journal.search_tags:
|
||||
text_fragments.extend(
|
||||
re.split(re.compile(re.escape(tag), re.IGNORECASE), text)
|
||||
re.split(re.compile(f"({re.escape(tag)})", re.IGNORECASE), text)
|
||||
)
|
||||
else:
|
||||
text_fragments = re.split(entry.tag_regex(config["tagsymbols"]), text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue