mirror of
https://github.com/taigrr/yq
synced 2025-01-18 04:53:17 -08:00
Merge branch 'coryrc-fix-merge-with-dots' into compare
This commit is contained in:
@@ -51,7 +51,15 @@ func mergePathStackToString(pathStack []interface{}, appendArrays bool) string {
|
||||
}
|
||||
|
||||
default:
|
||||
sb.WriteString(fmt.Sprintf("%v", path))
|
||||
s := fmt.Sprintf("%v", path)
|
||||
hasDot := strings.Contains(s, ".")
|
||||
if hasDot {
|
||||
sb.WriteString("[")
|
||||
}
|
||||
sb.WriteString(s)
|
||||
if hasDot {
|
||||
sb.WriteString("]")
|
||||
}
|
||||
}
|
||||
|
||||
if index < len(pathStack)-1 {
|
||||
|
||||
Reference in New Issue
Block a user