Skip to content

Extra new line added after line that longer than 80 symbols #222

@IvanGoncharov

Description

@IvanGoncharov

Test:

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

data = "Exactly 81 symbols in first line. Let's cound finale ones:             9876543210\n test"
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 
Exactly 81 symbols in first line. Let's cound finale ones:             9876543210
 test
===============================================================
>-
Exactly 81 symbols in first line. Let's cound finale
ones:             9876543210

 test

===============================================================
Exactly 81 symbols in first line. Let's cound finale ones:             9876543210

 test

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

So lib add extra newline after string with 80+ symbols.

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