mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-12 01:18:31 +02:00
Emoji support
This commit is contained in:
parent
6521d55a2b
commit
3a4c87ca4c
2 changed files with 11 additions and 2 deletions
|
@ -19,3 +19,11 @@ Feature: Basic reading and writing to a journal
|
||||||
Then the output should contain "Entry added"
|
Then the output should contain "Entry added"
|
||||||
When we run "jrnl -n 1"
|
When we run "jrnl -n 1"
|
||||||
Then the output should contain "2013-07-23 09:00 A cold and stormy day."
|
Then the output should contain "2013-07-23 09:00 A cold and stormy day."
|
||||||
|
|
||||||
|
Scenario: Emoji support
|
||||||
|
Given we use the config "basic.json"
|
||||||
|
When we run "jrnl 23 july 2013: 🌞 sunny day. Saw an 🐘"
|
||||||
|
Then the output should contain "Entry added"
|
||||||
|
When we run "jrnl -n 1"
|
||||||
|
Then the output should contain "🌞"
|
||||||
|
and the output should contain "🐘"
|
||||||
|
|
|
@ -171,8 +171,9 @@ def cli(manual_args=None):
|
||||||
# Writing mode
|
# Writing mode
|
||||||
if mode_compose:
|
if mode_compose:
|
||||||
raw = " ".join(args.text).strip()
|
raw = " ".join(args.text).strip()
|
||||||
unicode_raw = raw.decode(sys.getfilesystemencoding())
|
if type(raw) is not unicode:
|
||||||
entry = journal.new_entry(unicode_raw, args.date)
|
raw = raw.decode(sys.getfilesystemencoding())
|
||||||
|
entry = journal.new_entry(raw, args.date)
|
||||||
entry.starred = args.star
|
entry.starred = args.star
|
||||||
print("[Entry added to {0} journal]".format(journal_name))
|
print("[Entry added to {0} journal]".format(journal_name))
|
||||||
journal.write()
|
journal.write()
|
||||||
|
|
Loading…
Add table
Reference in a new issue