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

Forced literal scalars to use long keys

parent cdfbac1f
...@@ -536,11 +536,14 @@ namespace YAML ...@@ -536,11 +536,14 @@ namespace YAML
if(!good()) if(!good())
return *this; return *this;
PrepareNode(EmitterNodeType::Scalar);
const bool escapeNonAscii = m_pState->GetOutputCharset() == EscapeNonAscii; const bool escapeNonAscii = m_pState->GetOutputCharset() == EscapeNonAscii;
const StringFormat::value strFormat = Utils::ComputeStringFormat(str, m_pState->GetStringFormat(), m_pState->CurGroupFlowType(), escapeNonAscii); const StringFormat::value strFormat = Utils::ComputeStringFormat(str, m_pState->GetStringFormat(), m_pState->CurGroupFlowType(), escapeNonAscii);
if(strFormat == StringFormat::Literal)
m_pState->SetMapKeyFormat(YAML::LongKey, FmtScope::Local);
PrepareNode(EmitterNodeType::Scalar);
switch(strFormat) { switch(strFormat) {
case StringFormat::Plain: case StringFormat::Plain:
m_stream << str; m_stream << str;
......
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