{"action":"opened","issue":{"url":"https://api.github.com/repos/kpdecker/jsdiff/issues/51","labels_url":"https://api.github.com/repos/kpdecker/jsdiff/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/kpdecker/jsdiff/issues/51/comments","events_url":"https://api.github.com/repos/kpdecker/jsdiff/issues/51/events","html_url":"https://github.com/kpdecker/jsdiff/issues/51","id":61059767,"number":51,"title":"Wrong result of JsDiff.diffLines when there is an empty line before a change","user":{"login":"felicienfrancois","id":988144,"avatar_url":"https://avatars.githubusercontent.com/u/988144?v=3","gravatar_id":"","url":"https://api.github.com/users/felicienfrancois","html_url":"https://github.com/felicienfrancois","followers_url":"https://api.github.com/users/felicienfrancois/followers","following_url":"https://api.github.com/users/felicienfrancois/following{/other_user}","gists_url":"https://api.github.com/users/felicienfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/felicienfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felicienfrancois/subscriptions","organizations_url":"https://api.github.com/users/felicienfrancois/orgs","repos_url":"https://api.github.com/users/felicienfrancois/repos","events_url":"https://api.github.com/users/felicienfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/felicienfrancois/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-13T13:05:24Z","updated_at":"2015-03-13T13:05:24Z","closed_at":null,"body":"```javascript\r\nvar oldStr = \"Line1\\n\" + \"\\n\" + \"Line2\\n\";\r\nvar newStr = \"Line1\\n\" + \"\\n\" + \"ChangedLine\\n\";\r\nJsDiff.diffLines(oldStr, newStr);\r\n```\r\n\r\noutputs\r\n```javascript\r\n[\r\n  {\r\n    \"count\": 1, // Should be 2\r\n    \"value\": \"Line1\\r\\n\" // Should be \"Line1\\n\\n\"\r\n  },\r\n  {\r\n    \"count\": 1,\r\n    \"added\": true,\r\n    \"value\": \"ChangedLine\\n\"\r\n  },\r\n  {\r\n    \"count\": 1,\r\n    \"removed\": true,\r\n    \"value\": \"Line2\\n\"\r\n  }\r\n]\r\n```\r\n\r\nIn fact it seems successive `\\n` are replaced by `\\r` and ignored in counts"}}