From 3cba9952dbb5edee53596584d240e437f149f90a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 11 Apr 2026 02:42:34 +0000 Subject: [PATCH] Fix stale comment in hasStructuralChildren Agent-Logs-Url: https://github.com/mikefarah/yq/sessions/24db9a8f-601d-4ccf-ada7-129ed3226bb6 Co-authored-by: mikefarah <1151925+mikefarah@users.noreply.github.com> --- pkg/yqlib/encoder_toml.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/yqlib/encoder_toml.go b/pkg/yqlib/encoder_toml.go index f91d1717..e9b45516 100644 --- a/pkg/yqlib/encoder_toml.go +++ b/pkg/yqlib/encoder_toml.go @@ -514,7 +514,7 @@ func (te *tomlEncoder) encodeSeparateMapping(w io.Writer, path []string, m *Cand func (te *tomlEncoder) hasStructuralChildren(m *CandidateNode) bool { for i := 0; i < len(m.Content); i += 2 { v := m.Content[i+1] - // Only consider it structural if mapping has EncodeHintSeparateBlock or is non-empty + // Only consider it structural if mapping has EncodeHintSeparateBlock if v.Kind == MappingNode && v.EncodeHint == EncodeHintSeparateBlock { return true }