Skip to content
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

JsDiff newline trouble #18

Closed
coderaiser opened this issue Jul 19, 2013 · 3 comments
Closed

JsDiff newline trouble #18

coderaiser opened this issue Jul 19, 2013 · 3 comments

Comments

@coderaiser
Copy link

Hello,
thank you for good library :). It's very useful. I'm using it in my project.

I have trouble with applying patch of JsDiff on windows and linux.

server works on linux:

Index: cloudcmd.js
===================================================================
--- cloudcmd.js
+++ cloudcmd.js
@@ -1,5 +1,5 @@
+(function(){a
-(function(){
     'use strict';

     var DIR         = __dirname     + '/',
         main        = require(DIR   + 'lib/server/main'),

server works on windows:

Index: cloudcmd.js
===================================================================
--- cloudcmd.js
+++ cloudcmd.js
@@ -1,5 +1,5 @@
+(function(){a
-(function(){
\ No newline at end of file

     'use strict';

     var DIR         = __dirname     + '/',

As you see on windows OS there is an "\ No newline at end of file" string. I think that it's a reason why patch do not applying on windows.
For edeting text files I'm using Ace.

Can you help me please to figure out what's is going on.

@coderaiser
Copy link
Author

I think the possible reason could be line ending wich is different on windows and linux. So JsDiff must be do not working well with windows line ending.

@kpdecker
Copy link
Owner

#24 has been merged and released under 1.0.8. If that does not resolve this issue for you, please let me know and I can reopen.

@subashappvance
Copy link

Can someone share me diff.js file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants