Commit 944ebb7d authored by Jesse Beder's avatar Jesse Beder
Browse files

Fixed settings reverting properly

parent bf07af52
......@@ -402,7 +402,7 @@ namespace YAML
case EmitterNodeType::Scalar:
case EmitterNodeType::FlowSeq:
case EmitterNodeType::FlowMap:
SpaceOrIndentTo(m_pState->HasBegunContent(), curIndent);
SpaceOrIndentTo(true, curIndent);
break;
case EmitterNodeType::BlockSeq:
case EmitterNodeType::BlockMap:
......
......@@ -106,6 +106,7 @@ namespace YAML
void EmitterState::StartedScalar()
{
StartedNode();
ClearModifiedSettings();
}
void EmitterState::StartedGroup(GroupType::value type)
......@@ -150,6 +151,8 @@ namespace YAML
// some global settings that we changed may have been overridden
// by a local setting we just popped, so we need to restore them
m_globalModifiedSettings.restore();
ClearModifiedSettings();
}
EmitterNodeType::value EmitterState::CurGroupNodeType() const
......
......@@ -5,10 +5,7 @@ int main()
{
YAML::Emitter out;
out << YAML::BeginMap;
out << YAML::BeginMap;
out << "a" << "b";
out << YAML::EndMap;
out << YAML::BeginMap;
out << YAML::LongKey << "a" << "b";
out << "a" << "b";
out << YAML::EndMap;
out << YAML::EndMap;
......
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