{"action":"opened","issue":{"url":"https://api.github.com/repos/cloudfoundry-incubator/candiedyaml/issues/7","labels_url":"https://api.github.com/repos/cloudfoundry-incubator/candiedyaml/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/cloudfoundry-incubator/candiedyaml/issues/7/comments","events_url":"https://api.github.com/repos/cloudfoundry-incubator/candiedyaml/issues/7/events","html_url":"https://github.com/cloudfoundry-incubator/candiedyaml/issues/7","id":58431637,"number":7,"title":"Decode enters an infinite loop when processing nested anchors in an array","user":{"login":"coreyti","id":4937,"avatar_url":"https://avatars.githubusercontent.com/u/4937?v=3","gravatar_id":"","url":"https://api.github.com/users/coreyti","html_url":"https://github.com/coreyti","followers_url":"https://api.github.com/users/coreyti/followers","following_url":"https://api.github.com/users/coreyti/following{/other_user}","gists_url":"https://api.github.com/users/coreyti/gists{/gist_id}","starred_url":"https://api.github.com/users/coreyti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreyti/subscriptions","organizations_url":"https://api.github.com/users/coreyti/orgs","repos_url":"https://api.github.com/users/coreyti/repos","events_url":"https://api.github.com/users/coreyti/events{/privacy}","received_events_url":"https://api.github.com/users/coreyti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-21T01:01:16Z","updated_at":"2015-02-21T01:01:16Z","closed_at":null,"body":"Adding the following example to `decode_test.go` cause the spec to run indefinitely:\r\n\r\n```\r\nIt(\"can parse nested anchors\", func() {\r\n  d := NewDecoder(strings.NewReader(`\r\n---\r\na:\r\n  aa: &x\r\n    aaa: 1\r\n  ab:\r\n    aba: &y\r\n      abaa:\r\n        abaaa: *x\r\nb:\r\n- ba:\r\n    baa: *y\r\n`))\r\n  v := make(map[string]interface{})\r\n  err := d.Decode(&v)\r\n  Ω(err).ShouldNot(HaveOccurred())\r\n})\r\n```\r\n\r\n**Note that** changing `- ba` to `  ba` (no longer an array entry) allows the parsing to finish.\r\n"}}