Merged PR

This commit is contained in:
flight16 2015-05-23 15:19:48 +09:00
parent 95d399d5c3
commit 28d87861cc
3 changed files with 11 additions and 2 deletions

View file

@ -24,7 +24,7 @@
<key>Tags</key> <key>Tags</key>
<array> <array>
<string>work</string> <string>work</string>
<string>play</string> <string>PLaY</string>
</array> </array>
<key>Time Zone</key> <key>Time Zone</key>
<string>America/Los_Angeles</string> <string>America/Los_Angeles</string>

View file

@ -69,3 +69,12 @@ Feature: Zapped bugs should stay dead.
2014-04-24 09:00 Ran 6.2 miles today in 1:02:03. 2014-04-24 09:00 Ran 6.2 miles today in 1:02:03.
| I'm feeling sore because I forgot to stretch. | I'm feeling sore because I forgot to stretch.
""" """
Scenario: DayOne tag searching should work with tags containing a mixture of upper and lower case.
# https://github.com/maebert/jrnl/issues/354
Given we use the config "dayone.yaml"
When we run "jrnl @plAy"
Then the output should contain
"""
2013-05-17 11:39 This entry has tags!
"""

View file

@ -50,7 +50,7 @@ class DayOne(Journal.Journal):
date = date + timezone.utcoffset(date, is_dst=False) date = date + timezone.utcoffset(date, is_dst=False)
entry = Entry.Entry(self, date, text=dict_entry['Entry Text'], starred=dict_entry["Starred"]) entry = Entry.Entry(self, date, text=dict_entry['Entry Text'], starred=dict_entry["Starred"])
entry.uuid = dict_entry["UUID"] entry.uuid = dict_entry["UUID"]
entry._tags = [self.config['tagsymbols'][0] + tag for tag in dict_entry.get("Tags", [])] entry._tags = [self.config['tagsymbols'][0] + tag.lower() for tag in dict_entry.get("Tags", [])]
self.entries.append(entry) self.entries.append(entry)
self.sort() self.sort()