You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.x.x journals store dates plainly on a single line without any special text, but 2.0 wraps its dates in square brackets. It's a good change, and it works fine, except when we run into entries that have square brackets in them. There's a way around this problem (#630) but it's a bit of a rabbit hole.
In the meantime, it seems like we could simple "escape" anything that looks like a date when upgrading journals and saving new/edited entries. This could be as simple as adding a space before any line wrapped in brackets. It would still be readable in plain-text, but it couldn't possibly be interpreted as a date by jrnl.
I agree with this. We need to make this a bit more robust before asking everyone to upgrade their v1 journals. I like the space before a bracket, and could likely be done in the jrnl v1 → v2 migration code.
We should really add more tests to this functionality, too.
After looking through this more, I think that this escaping should only happen on upgrade from old jrnl versions. If we do it on saving an entry, it opens a huge rabbit-hole into what happens during editing, and users could lose the ability to split/merge/delete/add entries while editing.
Activity
wren commentedon Jul 24, 2019
I agree with this. We need to make this a bit more robust before asking everyone to upgrade their v1 journals. I like the space before a bracket, and could likely be done in the jrnl v1 → v2 migration code.
We should really add more tests to this functionality, too.
micahellison commentedon Aug 3, 2019
Once this is fixed, it should resolve #625.
wren commentedon Aug 3, 2019
After looking through this more, I think that this escaping should only happen on upgrade from old jrnl versions. If we do it on saving an entry, it opens a huge rabbit-hole into what happens during editing, and users could lose the ability to split/merge/delete/add entries while editing.
jrnl-org#631 Escape data in square brackets
Merge pull request #644 from wren/escape-dates-GH-631
Merge pull request #641 from gregorybodnar/create_encrypted_journal
#631 Escape data in square brackets
lock commentedon May 21, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.