From db3de3d1ccb3986097e0eef21de02a4e37e44e94 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 7 Aug 2014 13:25:50 +0200 Subject: Tags at the beginning of lines --- features/tagging.feature | 29 ++++++++++++++++++++--------- jrnl/Entry.py | 2 +- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/features/tagging.feature b/features/tagging.feature index 649ff9bf..9e6bca76 100644 --- a/features/tagging.feature +++ b/features/tagging.feature @@ -31,12 +31,23 @@ Feature: Tagging @c++ : 1 @c# : 1 """ - Scenario: An email should not be a tag - Given we use the config "tags-237.json" - When we run "jrnl --tags" - Then we should get no error - and the output should be - """ - @newline : 1 - @email : 1 - """ \ No newline at end of file + Scenario: An email should not be a tag + Given we use the config "tags-237.json" + When we run "jrnl --tags" + Then we should get no error + and the output should be + """ + @newline : 1 + @email : 1 + """ + + Scenario: Entry cans start and end with tags + Scenario: Writing an entry from command line + Given we use the config "basic.json" + When we run "jrnl today: @foo came over, we went to a @bar" + When we run "jrnl --tags" + Then the output should be + """ + @foo : 1 + @bar : 1 + """ diff --git a/jrnl/Entry.py b/jrnl/Entry.py index fb92c3b6..f04d9e0f 100755 --- a/jrnl/Entry.py +++ b/jrnl/Entry.py @@ -17,7 +17,7 @@ class Entry: self.modified = False def parse_tags(self): - fulltext = " ".join([self.title, self.body]).lower() + fulltext = " " + " ".join([self.title, self.body]).lower() tags = re.findall(r'(?u)\s([{tags}][-+*#/\w]+)'.format(tags=self.journal.config['tagsymbols']), fulltext, re.UNICODE) self.tags = tags return set(tags) -- cgit v1.2.3 From 2024e956bdff2aefa544450b16624af5a423c556 Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 7 Aug 2014 13:26:10 +0200 Subject: Version bump --- CHANGELOG.md | 1 + jrnl/__init__.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 699d7c08..0c320414 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changelog ### 1.9 (July 21, 2014) +* __1.9.3__ Fixed: Tags at the beginning of lines * __1.9.2__ Fixed: Tag search ignores email-addresses (thanks to @mjhoffman65) * __1.9.1__ Fixed: Dates in the future can be parsed as well. * __1.9.0__ Improved: Greatly improved date parsing. Also added an `-on` option for filtering diff --git a/jrnl/__init__.py b/jrnl/__init__.py index 8d23f05e..c041bbbc 100644 --- a/jrnl/__init__.py +++ b/jrnl/__init__.py @@ -8,7 +8,7 @@ jrnl is a simple journal application for your command line. from __future__ import absolute_import __title__ = 'jrnl' -__version__ = '1.9.2' +__version__ = '1.9.3' __author__ = 'Manuel Ebert' __license__ = 'MIT License' __copyright__ = 'Copyright 2013 - 2014 Manuel Ebert' -- cgit v1.2.3 From 9c4b97ef5cd9c0fd38c65ee33af851b572dc269b Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Thu, 7 Aug 2014 13:27:48 +0200 Subject: typo --- features/tagging.feature | 1 - 1 file changed, 1 deletion(-) diff --git a/features/tagging.feature b/features/tagging.feature index 9e6bca76..4eba8470 100644 --- a/features/tagging.feature +++ b/features/tagging.feature @@ -42,7 +42,6 @@ Feature: Tagging """ Scenario: Entry cans start and end with tags - Scenario: Writing an entry from command line Given we use the config "basic.json" When we run "jrnl today: @foo came over, we went to a @bar" When we run "jrnl --tags" -- cgit v1.2.3