fix bug from issue298:Emitter stylings settings overridden by node settings. (#915)

This commit is contained in:
Chen
2020-07-06 21:16:38 +08:00
committed by GitHub
parent 026a53fbe1
commit 6d5cfab5fd
6 changed files with 39 additions and 0 deletions

View File

@@ -59,6 +59,8 @@ void EmitFromEvents::OnSequenceStart(const Mark&, const std::string& tag,
default:
break;
}
// Restore the global settings to eliminate the override from node style
m_emitter.RestoreGlobalModifiedSettings();
m_emitter << BeginSeq;
m_stateStack.push(State::WaitingForSequenceEntry);
}
@@ -83,6 +85,8 @@ void EmitFromEvents::OnMapStart(const Mark&, const std::string& tag,
default:
break;
}
// Restore the global settings to eliminate the override from node style
m_emitter.RestoreGlobalModifiedSettings();
m_emitter << BeginMap;
m_stateStack.push(State::WaitingForKey);
}