-
-
Notifications
You must be signed in to change notification settings - Fork 524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Escaping date-like data in square brackets #631
Comments
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. |
Once this is fixed, it should resolve #625. |
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. |
#631 Escape data in square brackets
Fix for #631 Create encrypted journal
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. |
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.
Any thoughts on this?
The text was updated successfully, but these errors were encountered: