And now the space just ends up before the tag instead of after it

This commit is contained in:
Aaron Lichtman 2019-11-09 05:30:59 +01:00
parent 8d0aa98200
commit 09c0cccad2
No known key found for this signature in database
GPG key ID: 22368077DE9F9903

View file

@ -231,8 +231,8 @@ def highlight_tags_with_background_color(entry, text, color, bold=False):
:param fragments: List of strings representing parts of entry (tag or word). :param fragments: List of strings representing parts of entry (tag or word).
:rtype: List of tuples :rtype: List of tuples
:returns [(colorized_str, original_str)]""" :returns [(colorized_str, original_str)]"""
for fragment in fragments: for part in fragments:
for part in fragment.lstrip(" ").lstrip("\t").split(" "): # part = part.rstrip()
if part and part[0] not in config['tagsymbols']: if part and part[0] not in config['tagsymbols']:
yield (colorize(part, color, bold), part) yield (colorize(part, color, bold), part)
elif part: elif part: