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

Save files with unix linefeeds #426

Open
techtonik opened this issue Jun 28, 2016 · 5 comments
Open

Save files with unix linefeeds #426

techtonik opened this issue Jun 28, 2016 · 5 comments

Comments

@techtonik
Copy link
Contributor

On Windows nodebox saves files with Windows linefeeds and that creates problem for version control.

@fdb
Copy link
Member

fdb commented Jun 28, 2016

You mean the .ndbx files?

@techtonik
Copy link
Contributor Author

Yea. I got somewhere around these lines

// Convert the document to XML.

@techtonik
Copy link
Contributor Author

The best way would probably be to set:

System.setProperty("line.separator", "\n");

I don't know what is the best place for that though.

https://stackoverflow.com/questions/19102804/ensure-unix-style-line-endings-used-when-generating-xml-on-windows-with-java

@fdb
Copy link
Member

fdb commented Jun 28, 2016

Good call! There is no code there that says "do Windows line feeds", so I'll see how to override the defaults and always use Unix line endings.

Nice find BTW.

techtonik added a commit to techtonik/nodebox that referenced this issue Jun 28, 2016
This makes .ndbx files saved in the same way on Linux
and Windows. Fixes issue nodebox#426
@techtonik
Copy link
Contributor Author

@fdb this should do it.

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

2 participants