jbeder / yaml-cpp

A YAML parser and emitter in C++
MIT License
4.91k stars 1.78k forks source link

YAML::Literal when new line at the end, shoud be `|+` and not `|` #1238

Open shemeshg opened 8 months ago

shemeshg commented 8 months ago

it is ok for

YAML::Emitter out;
out << YAML::Literal << "A\n B\n  C";

to produce

|
A
 B
  C

But

YAML::Emitter out;
out << YAML::Literal << "A\n B\n  C\n";

should have produced

|+
A
 B
  C