From 33a7b3d1b4ad86b2f0626f899af88ae0a69f70db Mon Sep 17 00:00:00 2001 From: beder Date: Tue, 22 May 2012 12:59:07 -0500 Subject: [PATCH] Fixed block map prepare value (where the colon goes) --- src/emitter.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/emitter.cpp b/src/emitter.cpp index 4bdc03e..6b6e139 100644 --- a/src/emitter.cpp +++ b/src/emitter.cpp @@ -371,6 +371,9 @@ namespace YAML const unsigned curIndent = m_pState->CurIndent(); const unsigned nextIndent = curIndent + m_pState->CurGroupIndent(); const std::size_t childCount = m_pState->CurGroupChildCount(); + + if(child == EmitterNodeType::None) + return; if(!m_pState->HasBegunNode()) { if(childCount > 0) { @@ -400,9 +403,11 @@ namespace YAML const unsigned curIndent = m_pState->CurIndent(); const unsigned nextIndent = curIndent + m_pState->CurGroupIndent(); - if(false /* was long key */) { - } else { - m_stream << ":"; + if(!m_pState->HasBegunNode()) { + if(false /* was long key */) { + } else { + m_stream << ":"; + } } switch(child) {