Skip to content

Mixed line endings after save #7

@KirillPrygunkov

Description

@KirillPrygunkov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions