Commit b0dd0f86 authored by Jesse Beder's avatar Jesse Beder
Browse files

Fixed anchor/tag in seq > map

parent 3cae26a7
...@@ -337,6 +337,8 @@ namespace YAML ...@@ -337,6 +337,8 @@ namespace YAML
m_stream << "\n"; m_stream << "\n";
break; break;
case EmitterNodeType::BlockMap: case EmitterNodeType::BlockMap:
if(m_pState->HasBegunNode())
m_stream << "\n";
break; break;
} }
} }
......
...@@ -4,13 +4,16 @@ ...@@ -4,13 +4,16 @@
int main() int main()
{ {
YAML::Emitter out; YAML::Emitter out;
out << YAML::Anchor("monkey"); out << YAML::Anchor("monkey") << YAML::LocalTag("a");
out << YAML::BeginSeq; out << YAML::BeginSeq;
out << "foo"; out << "foo";
out << YAML::LocalTag("hi") << "bar"; out << YAML::LocalTag("hi") << "bar";
out << YAML::BeginMap; out << YAML::Anchor("asdf") << YAML::BeginMap;
out << "a" << "b" << "c" << "d"; out << "a" << "b" << "c" << "d";
out << YAML::EndMap; out << YAML::EndMap;
out << YAML::LocalTag("hi") << YAML::BeginSeq;
out << "a" << "b";
out << YAML::EndSeq;
out << YAML::EndSeq; out << YAML::EndSeq;
std::cout << out.c_str() << "\n"; std::cout << out.c_str() << "\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment