Otherwise people can put # or : or something else in the title and that
will result in invalid YAML.
Also escape any existing '. YAML is weird that the method of escaping a
' is by specifying it twice. It's sad that there is no dart YAML
serializer, and I'm surely missing some other edge cases. The YAML
specification is quite long.
It's no longer a simple JournalListing and instead we also show the
title. The main problem is with what to do when the title is not there.
Just leaving it blank seems to feel weird, specially when the note is
too small.
Maybe it's time to change it such that each row size is not the same.
We're effectively wasting whitespace right now for very small notes.
We're moving away from being a Journal Editor to being a Note Editor. I
don't want to discard the Journaling parts, as Journaling is really a
subset of Note Taking - so in the future it would be nice if this could
be somehow toggled.
Maybe each Folder can have different display settings. Probably in the
"pro" version.
It's a bit confusing that the created date has to be set when creating a
new note, and the path had to be constructured properly, without which
the note shouldn't be saved. Ideally, an object shouldn't be able exist
in such an inconsistent state.
Also sort the notes based on when last modified. Now that we're moving
towards being a more note-taking app, it makes sense that a recently
modified note goes on top.
Of course, the sorting should be controllable by the user, but the
default probably should be by when modified.
Now when adding/editing/removing a note, it gets modified from the
directory it was present in. There is no longer a just a plain list of
all notes, but always a tree of notes, which are inside Folders.