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

Mixed line endings after save #7

Open
KirillPrygunkov opened this issue Sep 20, 2017 · 0 comments
Open

Mixed line endings after save #7

KirillPrygunkov opened this issue Sep 20, 2017 · 0 comments

Comments

@KirillPrygunkov
Copy link

I have file with like this structure:

# comment

a: 0
b: 0

I load, change some value and save it:

var options = new HjsonOptions { EmitRootBraces = false, KeepWsc = true };
var config = HjsonValue.Load(configurationFileName, options);
config["a"] = 1;
HjsonValue.Save(config, configurationFileName, options);

After that file has mixed line endings:

  • in comment lines - LF
  • in value lines - CRLF

The situation repeats regardless of the source line endings. Files for testing:
CRLFConfig.txt
LFConfig.txt

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

1 participant