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

(macOS) diff contains \n characters #435

Closed
mpodshivalin opened this Issue Dec 26, 2016 · 8 comments

Comments

Projects
None yet
2 participants
@mpodshivalin

mpodshivalin commented Dec 26, 2016

Maybe I don't know something that I should, but when I look at the note history, sometimes I see \n characters where the new line should have been (image is in the attachment).

issue

Notes are stored correctly and there are no problems with that - they look normal in Note text tab.

I've googled diff images and couldn't find with these symbols - usually they have standard line breaks, but maybe I'm wrong.

Maybe this issue is related to #98 - it's not game breaking, but sometimes I see this window while working with a note only with differences in \n characters

@pbek

This comment has been minimized.

Owner

pbek commented Dec 26, 2016

\n is a line break, is there anything wrong with it? Is your complaint about the diff dialog or the fact that something is different in your notes?

@mpodshivalin

This comment has been minimized.

mpodshivalin commented Dec 27, 2016

My complaint is about writing \n instead of showing the actual line break. I've worked with other diff utilities (in SourceTree, FileMerge, etc), and none of them show \n - they show an an actual line break.

diff

Left image - how it works now, right image - how I want it to work :)

The function itself works fine, no bugs in saving notes. I just thought that this behaviour can be counter-intuitive (especially for non-programmers). If this is an intended functionality, please mark this 'issue' as closed.

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

Thank you for explaining. This is an intended functionality of the diff library https://github.com/pbek/QOwnNotes/tree/develop/src/libraries/diff_match_patch. There are different types of line break.

@pbek pbek closed this Dec 27, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

Sorry, I first thought we were talking about the note diff dialog, when a note was modified externally...
But we are talking about the ownCloud version dialog...
I now attempted to match the behavior of the note diff dialog by showing a character instead of \n.

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

16.12.14

  • now a character, followed by a new line is used instead of a \n to signal a line break in the diffs of the note versions dialog

@pbek pbek added this to the 16.12.14 milestone Dec 27, 2016

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

There now is a new release, could you please test it and report if the new features work for you?

@mpodshivalin

This comment has been minimized.

mpodshivalin commented Dec 27, 2016

Just updated, now everything works as I wanted. Thank you for you help.

@pbek

This comment has been minimized.

Owner

pbek commented Dec 27, 2016

Great, thank you for testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment