mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-06-29 14:06:14 +02:00
Listing all entries in DayOne Classic journal throws IndexError (#786)
* Reproduce bug in #780 🎵 I have no body, no body to love me... 🎵 The bug is cause by a DayOne entry that has to entry body. * Deal with empty bodies Close #780. * [Travis-CI] add "tree" command to debug missing files * Fix file location I have no idea why, but it ran locally fine without issue. Travis is more particular...
This commit is contained in:
parent
06aa8b50d0
commit
cec0beff9a
5 changed files with 65 additions and 8 deletions
|
@ -22,7 +22,7 @@ class Entry:
|
|||
def _parse_text(self):
|
||||
raw_text = self.text
|
||||
lines = raw_text.splitlines()
|
||||
if lines[0].strip().endswith("*"):
|
||||
if lines and lines[0].strip().endswith("*"):
|
||||
self.starred = True
|
||||
raw_text = lines[0].strip("\n *") + "\n" + "\n".join(lines[1:])
|
||||
self._title, self._body = split_title(raw_text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue