{"action":"created","issue":{"url":"https://api.github.com/repos/substack/tape/issues/171","labels_url":"https://api.github.com/repos/substack/tape/issues/171/labels{/name}","comments_url":"https://api.github.com/repos/substack/tape/issues/171/comments","events_url":"https://api.github.com/repos/substack/tape/issues/171/events","html_url":"https://github.com/substack/tape/pull/171","id":100201579,"number":171,"title":"improve yaml formating of diagnostic information","user":{"login":"hayes","id":816527,"avatar_url":"https://avatars.githubusercontent.com/u/816527?v=3","gravatar_id":"","url":"https://api.github.com/users/hayes","html_url":"https://github.com/hayes","followers_url":"https://api.github.com/users/hayes/followers","following_url":"https://api.github.com/users/hayes/following{/other_user}","gists_url":"https://api.github.com/users/hayes/gists{/gist_id}","starred_url":"https://api.github.com/users/hayes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hayes/subscriptions","organizations_url":"https://api.github.com/users/hayes/orgs","repos_url":"https://api.github.com/users/hayes/repos","events_url":"https://api.github.com/users/hayes/events{/privacy}","received_events_url":"https://api.github.com/users/hayes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-11T01:07:38Z","updated_at":"2015-08-12T17:56:42Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/substack/tape/pulls/171","html_url":"https://github.com/substack/tape/pull/171","diff_url":"https://github.com/substack/tape/pull/171.diff","patch_url":"https://github.com/substack/tape/pull/171.patch"},"body":"I am not sure this is the best way to do this, since I am not too familiar with yaml, but I wanted to at least get an opinion on this issue.  I am trying to find a way that has the smallest impact on existing behavior, but I believe the diagnostic part of tapes output should contain valid yaml\r\n\r\nCurrently tape produces invalid yaml for many errors and assertions.  This makes parsing the output very difficult.\r\n\r\nThis PR changes tapes output so that the `expected` and `actual` values in diagnostic yaml will be wrapped in double quotes (and double quotes will be prepended by a `\\` ) IFF the value contains a yaml indicator character (`?`, `:` or `-`).  This affects the output for most object comparisons.\r\n\r\nIt also updates the format of the `stack` property.  Currently stack traces are emitted as a folded multiline string that is collapsed when parsed as yaml, this PR changes it to be emitted as a literal  multiline string, so when parsed as yaml, it newlines will be preserved."},"comment":{"url":"https://api.github.com/repos/substack/tape/issues/comments/130391071","html_url":"https://github.com/substack/tape/pull/171#issuecomment-130391071","issue_url":"https://api.github.com/repos/substack/tape/issues/171","id":130391071,"user":{"login":"hayes","id":816527,"avatar_url":"https://avatars.githubusercontent.com/u/816527?v=3","gravatar_id":"","url":"https://api.github.com/users/hayes","html_url":"https://github.com/hayes","followers_url":"https://api.github.com/users/hayes/followers","following_url":"https://api.github.com/users/hayes/following{/other_user}","gists_url":"https://api.github.com/users/hayes/gists{/gist_id}","starred_url":"https://api.github.com/users/hayes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hayes/subscriptions","organizations_url":"https://api.github.com/users/hayes/orgs","repos_url":"https://api.github.com/users/hayes/repos","events_url":"https://api.github.com/users/hayes/events{/privacy}","received_events_url":"https://api.github.com/users/hayes/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T17:56:42Z","updated_at":"2015-08-12T17:56:42Z","body":"@Raynos I suppose I should do that. tap-parser internally uses a yaml parser to parse the diagnostic output, which avoids me manually grabbing that part of the output, but I'd be happy to switch it out if you think it would be better to use a yaml parser directly "}}