Fixed doc start/end

This commit is contained in:
Jesse Beder
2012-05-22 16:53:40 -05:00
parent bc884061e2
commit 2c2b788391
3 changed files with 19 additions and 1 deletions

View File

@@ -181,6 +181,8 @@ namespace YAML
if(m_stream.col() > 0)
m_stream << "\n";
m_stream << "---\n";
m_pState->StartedDoc();
}
// EmitEndDoc
@@ -313,7 +315,7 @@ namespace YAML
void Emitter::PrepareTopNode(EmitterNodeType::value child)
{
if(m_pState->CurGroupChildCount() > 0 && m_stream.pos() > 0) {
if(m_pState->CurGroupChildCount() > 0 && m_stream.col() > 0) {
if(child != EmitterNodeType::None)
EmitBeginDoc();
}