This commit is contained in:
Mike Farah
2025-12-08 20:30:47 +11:00
parent 1852073f29
commit 656f07d0c2
4 changed files with 299 additions and 5 deletions
+1
View File
@@ -181,6 +181,7 @@ func convertHclExprToNode(expr hclsyntax.Expression, src []byte) *CandidateNode
case *hclsyntax.ObjectConsExpr:
// parse object into YAML mapping
m := &CandidateNode{Kind: MappingNode}
m.Style = FlowStyle // Mark as inline object (flow style) for encoder
for _, item := range e.Items {
// evaluate key expression to get the key string
keyVal, keyDiags := item.KeyExpr.Value(nil)