Skip to content

Extra new line added #221

@IvanGoncharov

Description

@IvanGoncharov

Test:

var YAML = require('js-yaml');

data = "test1\ntest2"
console.log(data);
console.log('===============================================================');
data = YAML.safeDump(data);
console.log(data);
console.log('===============================================================');
data = YAML.safeLoad(data);
console.log(data);
console.log('===============================================================');

Output:

$ node test.js 
test1
test2
===============================================================
|-
test1
test2

===============================================================
test1
test2

===============================================================

So extra new line added in the end of string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions