mirror of
https://github.com/mikefarah/yq.git
synced 2026-06-28 07:57:43 +00:00
Depends on https://github.com/yaml/go-yaml/pull/348
This commit is contained in:
parent
862d805c80
commit
db1456532e
@ -46,7 +46,11 @@ const (
|
||||
func createStringScalarNode(stringValue string) *CandidateNode {
|
||||
var node = &CandidateNode{Kind: ScalarNode}
|
||||
node.Value = stringValue
|
||||
node.Tag = "!!str"
|
||||
if stringValue == "<<" {
|
||||
node.Tag = "!!merge"
|
||||
} else {
|
||||
node.Tag = "!!str"
|
||||
}
|
||||
return node
|
||||
}
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ func mergeObjects(d *dataTreeNavigator, context Context, lhs *CandidateNode, rhs
|
||||
|
||||
log.Debugf("going to applied assignment to LHS: %v with RHS: %v", NodeToString(lhs), NodeToString(candidate))
|
||||
|
||||
if candidate.Tag == "!!merge" {
|
||||
if candidate.Tag == "!!merge" && !candidate.IsMapKey {
|
||||
continue
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user