mirror of
https://github.com/mikefarah/yq.git
synced 2026-06-30 17:21:42 +00:00
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>
This commit is contained in:
parent
8c1cb6a5f0
commit
3cba9952db
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user