mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-18 12:08:31 +02:00
Fix issue where jrnl would erroneously mark entries from DayOne as modified due to whitespace differences
This commit is contained in:
parent
15ef9749ae
commit
42b8f2bdb8
1 changed files with 5 additions and 1 deletions
|
@ -127,7 +127,11 @@ class DayOne(Journal.Journal):
|
|||
match = matched_entries[0]
|
||||
if match != entry:
|
||||
self.entries.remove(match)
|
||||
entry.modified = True
|
||||
# DayOne's whitespace conventions are different from jrnl's, so compare 'split()'-ed entry
|
||||
# bodies instead of comparing the objects directly. This way whitespace differences won't
|
||||
# mark entries as modified
|
||||
if match.body.split() != entry.body.split():
|
||||
entry.modified = True
|
||||
self.entries.append(entry)
|
||||
else:
|
||||
# This entry seems to be new... save it.
|
||||
|
|
Loading…
Add table
Reference in a new issue