certik / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

indent and map #185

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
YAML::Emitter out;
out << YAML::Indent(2);
out << YAML::BeginMap;
write key and value here;
out << YAML::EndMap;

why key and value don't indent?
Thanks.

Original issue reported on code.google.com by ChenA.Invalid@gmail.com on 21 Jan 2013 at 2:35

GoogleCodeExporter commented 9 years ago
YAML::Indent sets the default number of spaces that yaml-cpp will indent each 
subsequent block. It doesn't simply indent the moment you call it.

You only have one block collection (the map), so it won't be indented at all. 
The next block, if you were to have one, would be indented two spaces.

Original comment by jbe...@gmail.com on 21 Jan 2013 at 3:42

GoogleCodeExporter commented 9 years ago
thanks for your reply.

Original comment by ChenA.Invalid@gmail.com on 22 Jan 2013 at 2:35