hjson-cs icon indicating copy to clipboard operation
hjson-cs copied to clipboard

Mixed line endings after save

Open KirillPrygunkov opened this issue 8 years ago • 0 comments

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

KirillPrygunkov avatar Sep 20 '17 16:09 KirillPrygunkov