{"action":"created","issue":{"url":"https://api.github.com/repos/sunesimonsen/unexpected/issues/111","labels_url":"https://api.github.com/repos/sunesimonsen/unexpected/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/sunesimonsen/unexpected/issues/111/comments","events_url":"https://api.github.com/repos/sunesimonsen/unexpected/issues/111/events","html_url":"https://github.com/sunesimonsen/unexpected/issues/111","id":54124148,"number":111,"title":"String diffs with outputFormat text","user":{"login":"gustavnikolaj","id":1371503,"avatar_url":"https://avatars.githubusercontent.com/u/1371503?v=3","gravatar_id":"","url":"https://api.github.com/users/gustavnikolaj","html_url":"https://github.com/gustavnikolaj","followers_url":"https://api.github.com/users/gustavnikolaj/followers","following_url":"https://api.github.com/users/gustavnikolaj/following{/other_user}","gists_url":"https://api.github.com/users/gustavnikolaj/gists{/gist_id}","starred_url":"https://api.github.com/users/gustavnikolaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gustavnikolaj/subscriptions","organizations_url":"https://api.github.com/users/gustavnikolaj/orgs","repos_url":"https://api.github.com/users/gustavnikolaj/repos","events_url":"https://api.github.com/users/gustavnikolaj/events{/privacy}","received_events_url":"https://api.github.com/users/gustavnikolaj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-12T23:45:32Z","updated_at":"2015-01-13T09:47:36Z","closed_at":null,"body":"I realize that the following block might not make sense without the coloring. But when you have outputFormat('ansi') or 'html' you get pretty diffs with colors. When you set outputFormat to text, you dont have any way of rendering the diff with colors, and thus just output the string as plain text on a new line. That looks a bit odd.\r\n\r\nCouldn't we just output it when we know we have colors available?\r\n\r\n```\r\n should-be-unexpected on master* $ node\r\n> var expect = require('unexpected');\r\nundefined\r\n> expect('foobar', 'not to match', /^foo/);\r\nError: \r\nexpected 'foobar' not to match /^foo/\r\n\r\nfoobar\r\n    at repl:1:1\r\n    at REPLServer.self.eval (repl.js:110:21)\r\n    at repl.js:249:20\r\n    at REPLServer.self.eval (repl.js:122:7)\r\n    at Interface.<anonymous> (repl.js:239:12)\r\n    at Interface.emit (events.js:95:17)\r\n    at Interface._onLine (readline.js:202:10)\r\n    at Interface._line (readline.js:531:8)\r\n    at Interface._ttyWrite (readline.js:760:14)\r\n    at ReadStream.onkeypress (readline.js:99:10)\r\n> expect.outputFormat('text');\r\n2\r\n> expect('foobar', 'not to match', /^foo/);\r\nError: \r\nexpected 'foobar' not to match /^foo/\r\n\r\nfoobar\r\n    at repl:1:1\r\n    at REPLServer.self.eval (repl.js:110:21)\r\n    at repl.js:249:20\r\n    at REPLServer.self.eval (repl.js:122:7)\r\n    at Interface.<anonymous> (repl.js:239:12)\r\n    at Interface.emit (events.js:95:17)\r\n    at Interface._onLine (readline.js:202:10)\r\n    at Interface._line (readline.js:531:8)\r\n    at Interface._ttyWrite (readline.js:760:14)\r\n    at ReadStream.onkeypress (readline.js:99:10)\r\n> \r\n```"},"comment":{"url":"https://api.github.com/repos/sunesimonsen/unexpected/issues/comments/69719420","html_url":"https://github.com/sunesimonsen/unexpected/issues/111#issuecomment-69719420","issue_url":"https://api.github.com/repos/sunesimonsen/unexpected/issues/111","id":69719420,"user":{"login":"sunesimonsen","id":90802,"avatar_url":"https://avatars.githubusercontent.com/u/90802?v=3","gravatar_id":"","url":"https://api.github.com/users/sunesimonsen","html_url":"https://github.com/sunesimonsen","followers_url":"https://api.github.com/users/sunesimonsen/followers","following_url":"https://api.github.com/users/sunesimonsen/following{/other_user}","gists_url":"https://api.github.com/users/sunesimonsen/gists{/gist_id}","starred_url":"https://api.github.com/users/sunesimonsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunesimonsen/subscriptions","organizations_url":"https://api.github.com/users/sunesimonsen/orgs","repos_url":"https://api.github.com/users/sunesimonsen/repos","events_url":"https://api.github.com/users/sunesimonsen/events{/privacy}","received_events_url":"https://api.github.com/users/sunesimonsen/received_events","type":"User","site_admin":false},"created_at":"2015-01-13T09:47:36Z","updated_at":"2015-01-13T09:47:36Z","body":"Yes let's just get rid of the diff in text mode."}}