What steps will reproduce the problem?
By using the following code:
YAML::Emitter out;
out << YAML::Comment("A comment describing the purpose of the file.");
out << YAML::BeginMap;
out << YAML::Key << "key1" << YAML::Value << "value1";
out << YAML::Comment("First comment");
out << YAML::Key << "key2" << YAML::Value << "value2";
out << YAML::Comment("Second comment");
out << YAML::EndMap;
What is the expected output? What do you see instead?
The result is:
# A comment describing the purpose of the file.key1: value1 # First comment
key2: value2 # Second comment
The first key of the map gets written along with the initial comment.
It should instead get written to the next line.
What version of the product are you using? On what operating system?
I am using the latest 0.2.6 on Archlinux.
Please provide any additional information below.
I can get around this by using a YAML::Newline, but this sounds like a bug ;)
Original issue reported on code.google.com by zorun...@gmail.com on 30 May 2011 at 1:39
Original issue reported on code.google.com by
zorun...@gmail.com
on 30 May 2011 at 1:39