mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-28 21:46:13 +02:00
There should be a whitespace character in front of a tag. Fixes issue #237.
This commit is contained in:
parent
f8a337f66e
commit
d5142a0a0a
4 changed files with 25 additions and 1 deletions
2
jrnl/Entry.py
Normal file → Executable file
2
jrnl/Entry.py
Normal file → Executable file
|
@ -18,7 +18,7 @@ class Entry:
|
|||
|
||||
def parse_tags(self):
|
||||
fulltext = " ".join([self.title, self.body]).lower()
|
||||
tags = re.findall(r'(?u)([{tags}][-+*#/\w]+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE)
|
||||
tags = re.findall(r'(?u)\s([{tags}][-+*#/\w]+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE)
|
||||
self.tags = tags
|
||||
return set(tags)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue