Fix indentation of empty sequences and add test

This commit is contained in:
Alejandro-FA
2024-01-25 18:19:15 +01:00
committed by Jesse Beder
parent 9eb1142900
commit c67d701ad8
2 changed files with 13 additions and 1 deletions

View File

@@ -213,7 +213,8 @@ void Emitter::EmitEndSeq() {
if (m_pState->CurGroupFlowType() == FlowType::Flow) {
if (m_stream.comment())
m_stream << "\n";
m_stream << IndentTo(m_pState->CurIndent());
if (originalType == FlowType::Block || m_pState->HasBegunNode())
m_stream << IndentTo(m_pState->CurIndent());
if (originalType == FlowType::Block) {
m_stream << "[";
} else {