Merge pull request #4190 from natasha41575/MigrateIndexPathIdAnnotations

Migrate index path id annotations
This commit is contained in:
Jeff Regan
2021-09-24 08:00:15 -07:00
committed by GitHub
36 changed files with 1053 additions and 92 deletions

View File

@@ -317,6 +317,7 @@ func (r *ByteReader) decode(originalYAML string, index int, decoder *yaml.Decode
}
if !r.OmitReaderAnnotations {
r.SetAnnotations[kioutil.IndexAnnotation] = fmt.Sprintf("%d", index)
r.SetAnnotations[kioutil.LegacyIndexAnnotation] = fmt.Sprintf("%d", index)
if r.PreserveSeqIndent {
// derive and add the seqindent annotation