-
Notifications
You must be signed in to change notification settings - Fork 503
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
Missing "No newline at end of file" when comparing two texts that do not end in newlines #94
Comments
I'm having the same problem. I'll try to find the cause and give you an update. |
ubuntu$> vi source.cpp |
5 tasks
vasek
added a commit
to vasek/jsdiff
that referenced
this issue
Aug 30, 2018
…t do not end in newlines (kpdecker#94)
vasek
added a commit
to vasek/jsdiff
that referenced
this issue
Aug 30, 2018
…t do not end in newlines (kpdecker#94)
vasek
added a commit
to vasek/jsdiff
that referenced
this issue
Sep 3, 2018
…t do not end in newlines (kpdecker#94)
Released in 4.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I created two text files, t1.txt:
and t2.txt:
Neither of them have a newline at the end.
Using the
diff
tool, I get:Using
jsdiff
, I get (on Node):There's a
\ No newline at end of file
missing after+line33
.I think this only happens when the last line has changed, but both new and old versions don't end in a newline. I couldn't find a test case in https://github.com/kpdecker/jsdiff/blob/master/test/patch/create.js which covers this case.
Tested on 2.2.1.
The text was updated successfully, but these errors were encountered: