mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 21:46:13 +02:00
using a common tag regex for searching and highlighting
This commit is contained in:
parent
5bfb82cf90
commit
2f1894c765
2 changed files with 10 additions and 4 deletions
|
@ -165,9 +165,9 @@ class Journal(object):
|
|||
lambda match: util.colorize(match.group(0)),
|
||||
pp, re.UNICODE)
|
||||
else:
|
||||
pp = re.sub(r"(?u)([{tags}]\w+)".format(tags=self.config['tagsymbols']),
|
||||
lambda match: util.colorize(match.group(0)),
|
||||
pp)
|
||||
pp = re.sub( Entry.Entry.tag_regex(self.config['tagsymbols']),
|
||||
lambda match: util.colorize(match.group(0)),
|
||||
pp)
|
||||
return pp
|
||||
|
||||
def __repr__(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue